Skip to content

Commit 801e4e8

Browse files
authored
Merge pull request #207458 from JasonFreeberg/patch-120
Add note about $NUM_CORES and guinicorn workers
2 parents 406263a + b949f43 commit 801e4e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

articles/app-service/configure-language-python.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ App Service ignores any errors that occur when processing a custom startup comma
278278
gunicorn --bind=0.0.0.0 --timeout 600 --workers=4 --chdir <module_path> <module>.wsgi
279279
```
280280
281-
For more information, see [Running Gunicorn](https://docs.gunicorn.org/en/stable/run.html) (docs.gunicorn.org).
281+
For more information, see [Running Gunicorn](https://docs.gunicorn.org/en/stable/run.html) (docs.gunicorn.org). If you are using scale rules to scale your web app up and down, you can dynamically set the number of workers using the `NUM_CORES` environment variable in our startup command, for example: `--workers $((($NUM_CORES*2)+1))`. For more information on setting the recommended number of gunicorn workers, see [the Gunicorn FAQ](https://docs.gunicorn.org/en/stable/design.html#how-many-workers)
282282
283283
- **Enable production logging for Django**: Add the `--access-logfile '-'` and `--error-logfile '-'` arguments to the command line:
284284

0 commit comments

Comments
 (0)