6

I can't seem to find the answer in gunicorn documentations. When you run a flask app using gunicorn without specifying the number of workers and threads, what is the default values for them?

Command:

gunicorn -b :$PORT main:app

1 Answer 1

7

According to the Gunicorn documentation for the number of workers:

By default, the value of the WEB_CONCURRENCY environment variable. If it is not defined, the default is 1.

1
  • 1
    Interesting. I previously noticed that Heroku sets this value to 2. Seems this is how they do it; exporting this env var results in a change to the default as shown within gunicorn --help.
    – v25
    Commented Jul 17, 2020 at 23:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.