Skip to content

Commit 394b54b

Browse files
fix: use WEB_CONCURRENCY env var for gunicorn workers
Replace hardcoded `-w 2` with `${WEB_CONCURRENCY:-1}` to allow runtime control. Default to 1 worker to avoid SQLite concurrent access race during lifespan startup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1ba297f commit 394b54b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/startup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export PATH="${VENV}/bin:$HOME/.asdf/bin:$HOME/.asdf/shims:$PATH"
1212

1313
server() {
1414
gunicorn \
15-
-w 2 \
15+
-w "${WEB_CONCURRENCY:-1}" \
1616
-k uvicorn.workers.UvicornWorker main:app \
1717
-b "0.0.0.0:${PORT:-3000}" \
1818
--log-file -

0 commit comments

Comments
 (0)