Skip to content
This repository was archived by the owner on Apr 30, 2026. It is now read-only.

Commit 33247dc

Browse files
a-dealclaude
andcommitted
Fix MCP session 404s: reduce to 1 gunicorn worker
MCP sessions are in-memory per worker. With 2 workers, requests round-robin and ~50% hit the wrong worker, returning 404. Claude Code retries but this causes intermittent disconnects. 1 worker is sufficient for 5 users. Blue-green restarts handle zero-downtime deploys. Also fixes misleading _connect_garmin hint. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 37b3e60 commit 33247dc

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

gunicorn.conf.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020
# Uvicorn workers for async FastAPI
2121
worker_class = "uvicorn.workers.UvicornWorker"
2222

23-
# 2 workers: enough for our traffic, allows graceful HUP reload
24-
# (new workers start before old ones drain)
25-
workers = 2
23+
# 1 worker: MCP sessions are in-memory per worker, so multiple workers
24+
# cause 404s when requests round-robin to the wrong one. Our traffic
25+
# (5 users) doesn't need concurrency. Blue-green handles zero-downtime.
26+
workers = 1
2627

2728
# Seconds to wait for in-flight requests before force-killing old workers
2829
graceful_timeout = 10

0 commit comments

Comments
 (0)