Skip to main content

CRE-2025-0058

Celery Worker Stops Consuming Tasks After Redis RestartMedium
Impact: 7/10
Mitigation: 4/10

CRE-2025-0058View on GitHub

Description

- When Redis is restarted, Celery workers using Redis as a broker may stop consuming tasks without exiting or logging a fatal error.\n- Although Celery Beat continues to publish tasks successfully, the worker remains in a broken state until manually restarted.\n- This results in a silent backlog of scheduled but unprocessed tasks.\n

Mitigation

- Monitor Redis availability and trigger Celery worker restarts automatically when Redis restarts.\n- Consider using process managers like `supervisord`, `systemd`, or Kubernetes liveness probes to enforce recovery.\n- Upgrade to Celery 5.4.0 or later, which includes Kombu 5.4.0 where the issue is fixed.\n- If upgrading is not possible, implement monitoring for task queue depth and alert on worker stalls.\n

References