Skip to content

Commit a41cbf4

Browse files
kenneivesclaude
andcommitted
fix(prod): bump nginx mem_limit 64M → 256M to stop OOM during backend recreates
Root-caused task #103: nginx Exited(137) during backend docker-compose --build && up -d flows. The 64M limit was tiny for nginx + WebSocket upgrade buffering + gzip + SSL termination during reconnection storms (every WS-connected client tries to reconnect through nginx simultaneously when backend recreates). Docker OOM-killed nginx with SIGKILL; restart: unless-stopped recovered it but with a 5-15s outage window. Fix: bump to 256M. EC2 has 3.7GiB total with 2.3GiB available. Post-mortem at docs/internal/nginx-103-postmortem.md. Applied via docker-compose up -d nginx after pull (using yesterday's env-loading fix in deploy-prod.sh). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 08bdc59 commit a41cbf4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

docker-compose.prod.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ services:
2626
deploy:
2727
resources:
2828
limits:
29-
memory: 64M
29+
# 256M (bumped from 64M 2026-05-28 per task #103 post-mortem).
30+
# nginx + WS upgrade buffering + gzip + SSL during backend recreates
31+
# was hitting the 64M limit and getting OOM-killed (exit 137).
32+
# EC2 has 2.3GiB available; 192MiB bump is negligible.
33+
memory: 256M
3034

3135
backend:
3236
build:

0 commit comments

Comments
 (0)