Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exceptions probably shouldn't close the writer #8

Open
billoneil opened this issue Jul 31, 2018 · 2 comments · May be fixed by #12
Open

Exceptions probably shouldn't close the writer #8

billoneil opened this issue Jul 31, 2018 · 2 comments · May be fixed by #12

Comments

@billoneil
Copy link

Just hit an issue where the http writer got a timeout exception from our metrics relay which may have been backed up or had a hiccup. This line closed the http writer which made it so metrics could not report for the rest of the JVM processes lifetime.

Is there a particular reason the writers are closed here? That makes it so they can't recover. I think the writers should be able to handle their own failures and it seems like they already can. The HTTP writer will just get a new http connection and try again on the next pass. Once its closed it just fails forever.

@kyeah
Copy link
Contributor

kyeah commented Sep 5, 2018

hey @billoneil, sorry for the delayed response — I missed this until now. The TcpWriter should recreate the connection after closing, and the HTTP writer should do the same (but currently doesn't).

I think the writers should be able to handle their own failures and it seems like they already can. The HTTP writer will just get a new http connection and try again on the next pass. Once its closed it just fails forever.

I wasn't aware of this behavior in the writers, but if so, then you're right — we can avoid manually closing the connection here.

@billoneil
Copy link
Author

@kyeah I'll try to make some pull requests when I get around to it for you. Have been a bit busy

@jobayle jobayle linked a pull request May 15, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants