4

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
  • 571
  • 4
  • 21
pizza
  • 584
  • 1
  • 10
  • 19

1 Answers1

5

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,237
  • 10
  • 24
  • 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