Understanding Celery to maintain your sanity
summary
Celery handles long background jobs via a broker (Redis in this case), workers that spawn subprocesses (concurrency defaults to CPU count) and a results store (Django ORM). Real issues: serializing whole files into task args filled Redis, worker prefetching (workers grabbed batches β default prefetch led to three long tasks stuck), and using acks_late without matching broker visibility_timeout=300s caused endless retries until visibility_timeout was raised to 24 hours. Operations used celery CLI, flower and Honeycomb tracing to inspect, revoke/terminate and recover the system.
AI-written summary Β· about
chapters (14)
- 0:00Introduction to Celery sanity
- 1:09Why use Celery background
- 4:41Celery system components
- 10:05Common Celery pitfalls
- 13:35Task acknowledgment issues
- 16:43Debugging with Celery CLI
- 22:26Monitoring tools Flower
- 23:29Q&A start
- 24:56Changing default settings
- 27:04Optimization focus
- 28:09Celery tutorials
- 28:58Flower storage concerns
- 30:04Celery vs cron tasks
- 31:07Periodic tasks issues
