Skip to main content
ONLINE TRACELITE BENCH // SENTRY OOM VS LEAN GLITCHTIP AUDIT: 2026-10-26 | TARGET: 1.8-6.5 GB RSS | ZERO CLICKHOUSE
GlitchTipRAM
GlitchTipRAM Disclosure: Outbound /go/ links marked rel="sponsored" may earn a partner commission at zero extra cost (Disclosures).
Error Diagnostics // TraceLite Bench

GlitchTip Celery Worker Backlog During Event Spikes

When a frontend loop or bad deploy fires 50,000 errors in 10 minutes, unbounded Celery worker memory grows rapidly until the worker container is OOM-killed.

Measured GlitchTip & Sentry Telemetry

Without CELERY_WORKER_MAX_TASKS_PER_CHILD, Python worker forks retain parsed stacktrace frames, source map ASTs, and Django QuerySet caches across thousands of tasks. Each worker process drifts from 140 MB to 550+ MB during event spikes.

Subsystem / SignalMeasured FootprintOperational Impact
Unbounded Celery Worker (4 procs)1.9 - 3.4 GB RSSMemory leak during sustained error bursts
Recycled Worker (max-tasks=500)480 - 920 MB RSSFlat memory sawtooth under 10M+ spikes
Safe Prefetch MultiplierPREFETCH=1Prevents 1 worker hoarding Redis tasks

Step-by-Step Triage & Compose Remediation

  1. Inspect Redis queue depth: Check LLEN celery inside the Redis container to confirm backlog saturation.
  2. Set worker task recycling: Add CELERY_WORKER_MAX_TASKS_PER_CHILD=500 and CELERY_WORKER_PREFETCH_MULTIPLIER=1 to .env.
  3. Cap worker mem_limit: Set mem_limit on the worker service inside docker-compose.yml so Postgres never gets starved.
docker compose exec redis redis-cli LLEN celery
# .env remediation:
CELERY_WORKER_CONCURRENCY=4
CELERY_WORKER_PREFETCH_MULTIPLIER=1
CELERY_WORKER_MAX_TASKS_PER_CHILD=500

Diagnostic FAQ

How many Celery workers fit on a 4 GB GlitchTip VPS?

2 to 4 Celery workers fit comfortably inside a 4 GB node alongside PostgreSQL 16 and Redis 7.

Why does PREFETCH_MULTIPLIER=1 matter during spikes?

Default prefetch=4 locks multiple heavy source-map tasks onto one worker while idle workers sit empty.

Related Error Diagnostics Guides

GlitchTipRAM: Cut error-tracking RAM from 16 GB to 1.8-6.5 GB Launch Vultr HF