Skip to content

Commit 3f9eb66

Browse files
authored
Adjust Gunicorn worker settings in production config
Address fastapi handling more traffic and requiring some more workers since it's not fully async yet
1 parent c46d346 commit 3f9eb66

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

compose.production.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ services:
1212
restart: unless-stopped
1313
hostname: "$HOSTNAME"
1414
environment:
15-
- GUNICORN_OPTS= --workers 30 --timeout 300 --max-requests 1500
15+
- GUNICORN_OPTS= --workers 28 --timeout 300 --max-requests 1500
1616
- OL_CONFIG=/olsystem/etc/openlibrary.yml
1717
# Note this won't work with uv pip, because uv makes a network request
1818
- BEFORE_START=pip install -e /booklending_utils
@@ -27,7 +27,7 @@ services:
2727
restart: unless-stopped
2828
hostname: "$HOSTNAME"
2929
environment:
30-
- GUNICORN_OPTS= --workers 2 --timeout 300 --max-requests 1500
30+
- GUNICORN_OPTS= --workers 4 --timeout 300 --max-requests 1500
3131
- OL_CONFIG=/olsystem/etc/openlibrary.yml
3232
volumes:
3333
- ../booklending_utils:/booklending_utils

0 commit comments

Comments
 (0)