Skip to content

Commit a8a3a84

Browse files
committed
Default WEB_CONCURRENCY to N CPU cores in dev
I was noticing in development that the server was hanging and I'd often receive gunicorn critical worker timeouts.
1 parent 713d11b commit a8a3a84

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

.env.example

+1-3
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,8 @@ export ALLOWED_HOSTS="*"
6060
#export PORT=8000
6161

6262
# How many workers and threads should your app use? WEB_CONCURRENCY defaults
63-
# to the server's CPU count * 2. That is a good starting point. In development
64-
# it's a good idea to use 1 to avoid race conditions when debugging.
63+
# to the server's CPU count * 2. That is a good starting point.
6564
#export WEB_CONCURRENCY=
66-
export WEB_CONCURRENCY=1
6765
#export PYTHON_MAX_THREADS=1
6866

6967
# Do you want code reloading to work with the gunicorn app server?

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/).
1616

1717
- Convert `SECRET_KEY` into a required env var
1818
- Add `required: false` to `depends_on` in `docker-compose.yml` (requires Docker Compose v2.20.2+)
19+
- Adjust `WEB_CONCURRENCY` to default to N number of CPU cores instead of 1 in development
1920
- Rename `docker-compose.yml` to `compose.yaml` to stick to the official Docker Compose spec
2021

2122
#### Languages and services

0 commit comments

Comments
 (0)