-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Dynamic resizing of cheroot Threadpool #190
Comments
Hi, I think we're not opposed to this but somebody has to write the code and submit a PR. You are welcome to do so :) |
This may be related to the refactoring @the-allanc is doing now. |
It's not really. I think the question is whether we bring in cherrypy_dynpool into the cheroot codebase. |
@the-allanc what I meant is that your change with having a manager entity should make it may easier.. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I'm submitting a ...
Currently the Threadpool implementation in cheroot provides a grow and shrink method which does not seem to be called anywhere inside cheroot by default. this also means that the "max" value passed in ThreadPool init is not used.
This results in a static number of threads being spawned at init time with no dynamism in response to number of requests handled by the server. As a defensive measure we generally have to init a sufficiently large number of threads (with an appopriate request_queue_size configuration).
π£ Describe the solution you'd like
ThreadPool should handle the the min and max num threads values.
The grow and shrink decisions can be taken at request start time or can be done as a busy loop. Given that cheroot is a excellent production ready, pure python WSGI server, dynamic load handling should come baked in to it rather than an external package.
π Describe alternatives you've considered
There is a cherrypy plugin that seems to be written explicitly for doing this: https://pypi.org/project/cherrypy-dynpool/
π Additional context
Cherrypy has a open issue that mentions this as a root cause:
cherrypy/cherrypy#1120
The text was updated successfully, but these errors were encountered: