Celery Tasks Not Executing in Production: Worker Fix
Celery tasks are queued but nothing happens? Check the worker, the broker URL, the queue name, eager mode and task registration, in that order, with the exact commands.
Celery tasks stop executing in production for five common reasons: no worker is running, the worker and the web app use different broker URLs, the task goes to a queue the worker does not consume, task_always_eager is on, or the worker never registered the task. Run celery -A proj inspect ping first, then inspect active_queues and inspect registered. Those three commands find most cases in under five minutes.
In development you start celery -A proj worker in a terminal and tasks run. In production the worker is a separate process that someone has to start, keep alive and point at the right Redis. When it is missing, task.delay() still returns happily. The message just sits in the broker. Nothing errors, so emails, exports and webhooks quietly stop. This guide uses Django and Redis, but the steps apply to any Celery setup.
Step 1: Check That a Worker Is Alive
Ask the workers to answer. Run this from the same environment and settings as your web app:
celery -A proj inspect ping
If you get Error: No nodes replied within time constraint, no worker is connected to this broker. Either the process is not running, it crashed on start, or it talks to a different broker. Check your process manager (systemctl status celery, supervisorctl status, or the separate worker service on Render, Railway or Fly). Many platforms only start the web process from your Procfile, so the worker never exists. This Render community thread and this Railway thread both describe that pattern.
Step 2: Confirm Web and Worker Use the Same Broker
The most common silent failure is two different Redis URLs. The web app publishes to one, the worker listens to another. Print the value in both places:
# settings.py
CELERY_BROKER_URL = os.environ["CELERY_BROKER_URL"]
celery -A proj report | grep -i broker
Run the report command on the worker host. Compare it with what the web container sees. A missing namespace="CELERY" is a related trap. If your celery.py does not call app.config_from_object("django.conf:settings", namespace="CELERY"), Celery ignores CELERY_BROKER_URL and falls back to the default local AMQP broker.
# proj/celery.py
import os
from celery import Celery
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "proj.settings")
app = Celery("proj")
app.config_from_object("django.conf:settings", namespace="CELERY")
app.autodiscover_tasks()
Also make sure proj/__init__.py imports the app (from .celery import app as celery_app). Without it, @shared_task may not bind to your app.
Step 3: Compare Queue Names
A worker only consumes the queues it was started with. The default queue is called celery. If you route a task to emails and start the worker without -Q emails, the task waits forever.
celery -A proj inspect active_queues
redis-cli LLEN celery
redis-cli LLEN emails
A growing LLEN for a queue that active_queues does not list is the proof. Fix it by starting the worker with every queue you use:
celery -A proj worker -Q celery,emails --loglevel=info
Check task_routes and any queue= arguments in your code against the list.
Step 4: Make Sure Eager Mode Is Off
If CELERY_TASK_ALWAYS_EAGER = True reaches production, tasks run inside the web process and never touch the broker. You will see no worker activity at all. This often comes from a shared settings file used by tests. Search for it:
grep -rn "ALWAYS_EAGER" .
Make it a test-only setting.
Step 5: Check the Worker Registered Your Task
Even a connected worker ignores tasks it does not know. Look for Received unregistered task in the log, or list what the worker knows:
celery -A proj inspect registered
If your task is missing, Celery never imported its module. Check that each Django app has a tasks.py and is in INSTALLED_APPS. After a deploy, restart the worker. Workers keep old code in memory, so a task added in the new release is unknown to the old process. The guide at fixdevs lists the same registration and import causes.
Step 6: Fix Tasks That Run Before the Data Exists
Sometimes the task runs but fails with DoesNotExist. The web request queued the task inside a database transaction that had not committed yet, and the worker was faster. Queue it after commit:
from django.db import transaction
def create_order(request):
order = Order.objects.create(...)
transaction.on_commit(lambda: send_receipt.delay(order.id))
For periodic tasks, remember that celery beat is a separate process. A worker alone never fires scheduled jobs. If a schedule stopped, see our guide on cron jobs that stop running silently.
Step 7: Stop Slow Tasks Blocking Fast Ones
If the worker is alive but tasks are delayed, prefetching is a likely cause. By default a worker reserves several messages ahead. One long task can hold fast ones behind it. For uneven workloads use:
CELERY_WORKER_PREFETCH_MULTIPLIER = 1
CELERY_TASK_ACKS_LATE = True
acks_late means a task is acknowledged after it finishes, so a worker crash does not lose it. Only enable it for tasks that are safe to run twice. With Redis as the broker, also keep in mind the visibility timeout. A task that runs longer than it can be redelivered and run again.
Step 8: Alert When the Queue Stops
All of the above is manual. The real risk is finding out from a customer. Track two numbers: queue length and the age of the oldest waiting task. A rising queue with a flat processed count means the worker is down. The same idea for Node is in our BullMQ failed jobs guide, and the PHP version is in Laravel queue jobs not processing.
How Relia Helps
A dead Celery worker shows up first as symptoms: orders without receipts, exports that never arrive. Relia watches the users, APIs, database and servers of a live product and joins related signals into one incident explained in plain words, including who was affected. Relia has a Python package for Django, FastAPI and Flask apps. You can also add uptime checks and monitors on key pages. There is a Free plan, and a live demo at app.tryrelia.com/demo.
FAQ
Why does Celery receive tasks but not execute them?
Usually the worker pool is blocked by long tasks, the concurrency is too low, or prefetching holds messages behind a slow task. Lower the prefetch multiplier and check inspect active.
How do I check if a Celery worker is running?
Run celery -A proj inspect ping. A reply means at least one worker is connected to that broker.
Why do my Celery periodic tasks not run?
celery beat must run as its own process. A worker does not schedule tasks by itself.
How do I see how many tasks are waiting in Redis?
Run redis-cli LLEN <queue name>. The default queue name is celery.