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

Default sleep_on_errors to false #1712

Closed
sanmai-NL opened this issue Nov 17, 2018 · 5 comments
Closed

Default sleep_on_errors to false #1712

sanmai-NL opened this issue Nov 17, 2018 · 5 comments

Comments

@sanmai-NL
Copy link
Contributor

sanmai-NL commented Nov 17, 2018

The behavior in https://docs.rs/hyper/0.12.14/hyper/server/conn/struct.AddrIncoming.html#method.set_sleep_on_errors (PR #1450) is speculative. It shouldn’t default to true, since it masks error conditions and does not appreciably reduce the risk of service unavailability, as intended (#1358).

I suggest to default this parameter to false or, better yet, remove this code.

@sanmai-NL
Copy link
Contributor Author

Although the implementer notes an error log entry would be emitted, he/she does not indicate how to control and view this error log. E.g., what env. var. should be set and for which path?

@sanmai-NL
Copy link
Contributor Author

I invite @klausi (issue reporter and main implementer) and @aep (discussion contributor) to this discussion.

@seanmonstar
Copy link
Member

Sleeping on TCP accept errors is actually common in other libraries, like nginx, nodejs, Netty...

Was it masking an actual problem in your server?

@sanmai-NL
Copy link
Contributor Author

sanmai-NL commented Nov 17, 2018

@seanmonstar Perhaps yes.

Could you please point me to the code and the rationale for this behavior in nginx or Netty? nginx isn’t a library AFAIK so the error handling strategy would be different.

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

No branches or pull requests

2 participants