How can I ensure Azure App Service uses my gunicorn.conf.py when starting my Flask API? I am trying to increase the number of gunicorn workers.

Helms, Benjamin 41 Reputation points
2022-07-11T21:31:36.377+00:00

I am deploying a Flask API to Azure App service. However, the API is single threaded when deployed. After following the docs referenced below, I have attempted to increase the number of gunicorn workers by adding a gunicorn.conf.py file. However, the API still only runs with a single worker in App service. I have SSHed in and confirmed the file is deployed in the root directory of the Flask Application. Please advise on how to further troubleshoot.

Microsoft Learn referencing adding the file:
https://learn.microsoft.com/en-us/azure/app-service/configure-language-python#flask-app

Flask Docs:
https://docs.gunicorn.org/en/stable/configure.html#configuration-file

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,862 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.