-
Notifications
You must be signed in to change notification settings - Fork 157
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
Broken keep-alive results in hanging server #392
Comments
If you pass None to nickel.keep_alive_timeout method, there will be no keep alives, which will address the thread exhaustion problem, at the cost of a performance hit. This trade off should be resolved once async support lands. |
This seems to be related to #308 and hyperium/hyper#368. @jolhoeft I've added this to my code and I can confirm it works nicely. Thanks!
|
Hyper 0.11 has just been released with async support. I've created #402 to track upgrading. Since there is a viable work around, I am resolving this issue. |
I'm playing with nickel. My application sends a lot of images to the client using
Setting |
I wrote my first nickel webapp yesterday (and I really loved it!). After putting all my code together with the frontend code I wrote (which is also served by nickel), I started to run into issues.
I opened my application in firefox and after the static assets got loaded, the server was hanging for the api request. After requests started to hang, other requests I did with curl were also hanging.
I noticed the time the server was hanging was sort of consistent, at around ~75-76s, after Sergio on irc pointed out it might be a keep-alive issue I digged through the source and found this line:
which was really close to the delay I was experiencing. I didn't have issues (at all) when curling all my routes individually, so I wrote this piece of middleware that adds
Connection: close
to all responses:After that, my application loads nicely in firefox. My application is probably still prone to DoS from malicious clients that don't respect this header and I'd prefer to get rid of my workaround.
The text was updated successfully, but these errors were encountered: