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

unable to configure read timeout, and no default provided #1472

Closed
ahicks92 opened this issue Nov 9, 2020 · 3 comments
Closed

unable to configure read timeout, and no default provided #1472

ahicks92 opened this issue Nov 9, 2020 · 3 comments
Labels
deficiency Something doesn't work as well as it could

Comments

@ahicks92
Copy link

ahicks92 commented Nov 9, 2020

I'm not sure if this is a bug, question, or feature request, but hopefully there's an answer in any case. We're on Rocket 0.4.5, multiple versions of Linux, trying to adopt Rocket for some microservices, and our test servers are getting taken offline in a manner that suggests that no read timeout is set on the socket. I've dug through the code, and:

  • The block of code that sets Hyper up doesn't seem to set one.
  • Hyper seems to default to no read timeout unless you set it.

We're still investigating this some on our end, but the next step seems to be to configure a read timeout, which I can't figure out how to do. Is this possible? If not, and if no read timeout is set, it seems to me that it is trivially easy to DOS a rocket server. Any advice would be appreciated.

@ahicks92
Copy link
Author

ahicks92 commented Nov 9, 2020

As a clarification, I'm talking about Server::set_read_timeout in Hyper, not HTTP keep-alive.

@SergioBenitez SergioBenitez added the deficiency Something doesn't work as well as it could label Nov 9, 2020
@SergioBenitez
Copy link
Member

To be clear, the latest tip of v0.4 does indeed set a default timeout. Alas, it is not configurable, which we should remediate.

SergioBenitez added a commit that referenced this issue Nov 9, 2020
@SergioBenitez
Copy link
Member

Resolved by 86bd7c1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deficiency Something doesn't work as well as it could
Projects
None yet
Development

No branches or pull requests

2 participants