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
Tell Oryx to configure gunicorn workers dynamically #461
Conversation
cc @jongio We may want to put this setting by default in core/host/appservice.bicep - the only reason its not default on Oryx is backwards compatibility issues. |
Just chiming in that making this change fixed the issue I was having as mentioned in #272 |
+1 to making the change in core/host/appservice.bicep, feels like this should be specific to the app service config rather than in the main bicep file. |
@pamelafox Can you also look in to this? Adjust the number of workers based on the number of CPU cores
|
* Auto-configure optimal workers * Revert model changes * Move to appservice.bicep conditional on language
Purpose
This PR enables PYTHON_ENABLE_GUNICORN_MULTIWORKERS on App Service. When Oryx sees that, it will auto configure gunicorn to use a worker count based off the formula of CPU_COUNT * 2 + 1. This should hopefully resolve issues like #272.
Here's Oryx docs about the config option:
https://github.com/microsoft/Oryx/blob/5239b0416cdddcf5bf0aef6703eb339efa865d67/doc/runtimes/python.md?plain=1#L101
The other approach is for us to specify our own startup script that does the same thing (as I describe in #272 (comment)), but for now, this is the quickest fix.
Does this introduce a breaking change?
Pull Request Type
What kind of change does this Pull Request introduce?
How to Test