Commit 0398dad
fix(deploy): prevent App Engine request starvation under burst load
Prod cycled between 0-1 instances and returned site-wide 500/503 with
"Request was aborted after waiting too long to attempt to service your
request." Requests died in the pending queue (blank instanceId, ~2ms
latency), not in app code — App Engine never scaled out past one
instance despite max_instances=10.
Root cause: the scheduler had no visibility into real per-instance
concurrency (gunicorn -w 4), so it kept routing bursts to a single
saturated instance instead of spinning up more. min_instances=0 added
cold-start pile-ups on top.
- app.template.yaml: add max_concurrent_requests: 6 so the scheduler
scales out before an instance saturates (2-worker headroom for bursts)
- CD_production.yml: MIN_INSTANCES 0 -> 1 to kill cold-start pile-ups
- CD_production.yml: gunicorn -w 4 -> -w 8 for more concurrency per F4
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 0ac283d commit 0398dad
2 files changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
152 | | - | |
| 151 | + | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| |||
0 commit comments