-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Thread pool size issue #322
Comments
Hyper's thread pool size is tunable using http://hyperium.github.io/hyper/hyper/server/struct.Server.html#method.listen_threads. |
We do have an issue for pervasive timeouts: #315 |
@Ap0ph1s I don't know if this is a satisfactory answer for you, but on the web app world it's common to use a reverse proxy (commonly nginx) to serve static files and deal with slow clients. Since nginx is event-driven, it doesn't need a big thread pool to handle a big number of clients, and you can remove that concern from your backend server. |
@renato-zannon Thanks! Ill keep that in mind. |
After some days of diagnosing my website because of latency issues, a friend from IRC (@jshs) and I started testing the website by having multiple open connections, and have come to the conclusion that hyper's thread pool size is too small, this is what we came up with:
small thread pool size + keepalive + no timeouts => server blocked
we tested this using this python script:
https://gist.github.com/jshs/e38eef7aa2c360aef696
and it stopped after trying to send the 2nd request, and the website after was unresponsive.
since sometimes this happens when 2 people connect using browsers, it would take about 60s to
load the page, after the other connection is closed.
Could this be fixed with increasing the thread pool size on hyper's side?
VPS specs: single core
The text was updated successfully, but these errors were encountered: