Error Diagnostics // TraceLite Bench
Django Gunicorn Worker OOM & 504 Ingest Gateway Timeouts
Too many Gunicorn workers exhaust RAM on 2-4 GB VPS, while too few workers cause /api/store ingest requests to time out behind Nginx or Caddy.
Measured GlitchTip & Sentry Telemetry
GlitchTip handles both browser UI queries and high-volume SDK /api/{id}/envelope/ ingestion on its Django web service. If WEB_CONCURRENCY is set to 8 on a 2 GB VPS, Gunicorn alone claims >1.6 GB; if set to 1, a heavy 90-day issue query blocks incoming SDK envelopes.
| Subsystem / Signal | Measured Footprint | Operational Impact |
|---|---|---|
| 2 GB VPS Web Concurrency | WEB_CONCURRENCY=2 | 320 - 450 MB RSS total |
| 4-8 GB VPS Web Concurrency | WEB_CONCURRENCY=2 to 4 | 420 - 780 MB RSS total |
| Worker Recycle Threshold | --max-requests=2000 | Prevents slow Django memory drift |
Step-by-Step Triage & Compose Remediation
- Check web container logs: Look for [CRITICAL] WORKER TIMEOUT or SIGKILL in docker compose logs web.
- Set explicit WEB_CONCURRENCY: Use 2 workers on 2-4 GB VPS and 4 workers on 8-16 GB VPS instead of auto-detecting high core counts.
- Enable Gunicorn request recycling: Pass GUNICORN_CMD_ARGS="--max-requests=2000 --max-requests-jitter=200".
WEB_CONCURRENCY=2 GUNICORN_CMD_ARGS="--max-requests=2000 --max-requests-jitter=200 --timeout=60"
Diagnostic FAQ
Why does GlitchTip eat extra RAM on a 4-vCPU VPS with default settings?
Auto-scaling Gunicorn or Celery concurrency based on CPU cores spawns too many Python processes for a 4 GB node.
Should I put Cloudflare or Nginx in front of GlitchTip?
Yes—Nginx or Caddy handles TLS termination and gzip compression cheaply outside Python workers.