Hard-Learned Celery Production Tips: Monitoring, Retries, and Silent Failure Fixes
A software team sharing lessons from four years of Celery deployments describes how a silent worker failure once left 40,000 tasks unprocessed and delayed client invoices for two weeks. The core issue is that Celery, by default, acknowledges tasks before they run, meaning a worker crash silently drops the job with no alert raised. Setting task_acks_late and task_reject_on_worker_lost ensures failed tasks are requeued rather than lost, while worker memory and task-count limits prevent gradual degradation. The team also recommends deploying Flower with event tracking enabled to monitor queue depth and active worker counts, triggering alerts when thresholds are breached. For task reliability, they use exponential backoff retries with differentiated handling for expected errors versus genuine data-missing cases.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in