1

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
Chandan
  • 531
  • 4
  • 21
pizza
  • 414
  • 7
  • 16

1 Answers1

3

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.

Parth Shah
  • 1,050
  • 9
  • 20
  • 1
    Interesting. [I previously noticed](https://stackoverflow.com/a/62330039/2052575) 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 Jul 17 '20 at 23:40