forked from frappe/bench
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
max_requests
to gunicorn args
As gunicorn is long running process, potentially running for days without restart the workers might start accumulating garbage that's never cleaned up and memory usage spikes after some use. This largely happens because of third-party module imports like pandas, openpyxl, numpy etc. All of these are required only for few requests and can be easily re-loaded when required. `max_requests` restarts the worker after processing number of configured requests. How to use? - If you have more than 1 gunicorn workers then this is automatically enabled. You can tweak the max_requests parameter with `gunicorn_max_requests` key in common_site_config - If you just have 1 gunicorn worker (not recommended) then this is not automatically enabled as restarting the only worker can cause spikes in response times whenever restart is triggered.
- Loading branch information
Showing
5 changed files
with
30 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters