Error Diagnostics // TraceLite Bench
Docker Container Exit Code 137 (SIGKILL) on 2–4 GB VPS
When total container RSS crosses the Linux cgroup or host RAM ceiling on a 2-4 GB VPS, the kernel shoots the highest-scoring OOM process with Exit 137.
Measured GlitchTip & Sentry Telemetry
Exit 137 is a kernel SIGKILL from the OOM killer, not an application bug. On small 2 GB nodes without ZRAM/swap or bounded worker mem_limit, a single burst makes Celery + Postgres exceed 2.0 GB and kills Postgres mid-transaction—causing recovery pauses.
| Subsystem / Signal | Measured Footprint | Operational Impact |
|---|---|---|
| 2 GB Vultr HF Safe Ceiling | 1.8 - 1.95 GB RSS | Requires 2 GB ZRAM/swap + 2 workers |
| 4 GB Hostinger KVM 1 Ceiling | 3.1 - 3.4 GB RSS | Comfortable for 100k-3M events/mo |
| OOM Score Priority | Cap worker mem_limit first | Protects Postgres from mid-write SIGKILL |
Step-by-Step Triage & Compose Remediation
- Verify Exit 137 via docker inspect: Run docker inspect <container> --format "{{.State.OOMKilled}} {{.State.ExitCode}}".
- Protect PostgreSQL with worker mem_limit: Set mem_limit on the Celery worker container so bursts recycle Celery instead of killing Postgres.
- Add 2 GB ZRAM or NVMe swap: Give Linux kernel cold-page headroom on 2-4 GB VPS instances.
docker ps -a --filter "exited=137"
docker inspect glitchtip-worker-1 --format "OOMKilled={{.State.OOMKilled}} Exit={{.State.ExitCode}}"
Diagnostic FAQ
Why did Postgres get OOM-killed instead of Celery?
Linux scores OOM victims by total resident memory; an un-capped Postgres shared_buffers + cache can score higher than individual worker forks.
Does upgrading from 2 GB to 4 GB eliminate Exit 137?
For 100k-3M events/mo with bounded concurrency and retention, a 4 GB node (Hostinger KVM 1 $4.99/mo or Vultr HF 4 GB $24/mo) provides ample headroom.