Error Triage Hub (9)
Puma Worker SIGKILL 137 During Inbound Webhook Storms
Forked Puma workers duplicate Ruby copy-on-write pages over time and hit Linux cgroup OOM killers (exit 137) during webhook bursts.
Signal: Exit 137 (SIGKILL) | Trigger: WEB_CONCURRENCY >= 4 on 4-8 GB
Copy-on-Write Decay Across Forked Puma Workers
Setting WEB_CONCURRENCY=4 or higher on a 4-8 GB VPS spawns four full Rails worker processes plus threads. As each worker processes multipart webhooks and ActiveRecord JSON payloads, CoW memory diverges from ~380 MB shared baseline to 950+ MB per worker.
Confirming Kernel OOM Killer vs Application Crash
Run dmesg -T | grep -i oom or inspect docker inspect chatwoot-rails-1 --format "{{.State.OOMKilled}}". Exit code 137 with OOMKilled=true confirms Linux killed the Puma master or worker to protect the host kernel.
Measured Thresholds & Configuration
| Puma Worker Setting | Peak RSS (jemalloc) | Safe Host RAM Floor |
|---|---|---|
| WEB_CONCURRENCY=1, THREADS=5 | 0.85 - 1.25 GB | 4-8 GB VPS (light team) |
| WEB_CONCURRENCY=2, THREADS=5 | 1.40 - 1.95 GB | 8 GB Hostinger KVM 2 |
| WEB_CONCURRENCY=4, THREADS=5 | 2.80 - 3.90 GB | 16 GB Hostinger KVM 4 |