published fresh until

Celery: recover a worker after a Redis reset?

Summary As of October 2026, a Celery worker that hangs after a Redis connection reset needs a task-consumption check as well as broker and control checks; verify retry settings, then start with celery -A proj inspect ping --timeout=10.

Not for Dramatiq or arq as the FastAPI job queue instead of Celery, see celery-dramatiq-or-arq-for-fastapi-background-jobs-2026

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

For Connection reset by peer, check Celery consumption separately from Redis reachability before changing reconnect settings.

The worker process remains alive, but tasks stop completing after a broker interruption.

Do first: run celery -A proj inspect ping --timeout=10, replacing proj with your application module, and compare the response with worker logs and the last completed task.

Public reports establish this failure pattern; they do not establish one flag that fixes every installation. Not for: choosing Celery, Dramatiq or ARQ for FastAPI; see celery-dramatiq-or-arq-for-fastapi-background-jobs-2026.

Diagnostic: Connection reset by peer

1. Record installed Celery, Kombu and Redis-client versions without dumping broker credentials: python -m pip show celery kombu redis. As of November 2026, the current stable documentation identifies Celery 5.7.0; that is a diagnostic reference, not a promise that changing Celery alone fixes reconnection. Stable Redis guide, checked 2026-11-15. 2. Compare inspect active, inspect reserved and inspect active_queues for the expected worker. Use the same application and intended destination. A control timeout can mean broker/control trouble; a control reply does not prove task consumption works. The commands are in the workers guide. 3. Inspect the broker service's own connection/failover logs at the reset time. Check the intended queue and routing configuration before treating an idle worker as frozen. Use a harmless application canary task on a disposable queue to verify new work completes after reconnecting. 4. Verify these settings in the loaded application configuration:

broker_connection_retry = True
broker_connection_retry_on_startup = True

broker_connection_retry defaults to enabled; broker_connection_retry_on_startup defaults to None and inherits that setting. The first concerns reconnecting after connection loss; the second concerns initial startup. broker_connection_max_retries bounds retry attempts; None retries forever, which needs an independent alert rather than an assumption of recovery. Configuration reference. 5. For a worker that demonstrably stopped consuming, capture sanitized logs before a supervised restart. Prefer a warm shutdown so executing tasks can finish; a hung process may require your incident procedure. Determine which jobs can safely replay before forcing termination. Shutdown behavior. 6. In an isolated test, interrupt and restore the broker, then check that a new canary completes without manually restarting the worker. Measure elapsed time against your own recovery objective. If it fails, attach exact dependency versions, routing and a minimal reproduction to upstream.

Options and limits

ActionFor / winsLosesCost or limit; pick this if
Reconnect configuration plus supervised recoveryRecovering the existing Redis deploymentThe consumer is wedged despite reconnectWorker/broker capacity and interruption cost remain. Pick this as the initial incident path.
Disable gossip/mingle/heartbeat in an isolated reproductionTesting whether worker coordination participatesYou depend on those coordination/monitoring features, or the failure persistsRemoves features; no guaranteed cure. Pick this only as an untested experiment for your deployment.

A Redis visibility timeout governs redelivery of unacknowledged messages, not reconnect detection. Its documented default is one hour; increasing it can delay recovery of lost work. Do not change it merely to treat a reset. Redis caveats.

Solo and small-team default: keep the current broker, prove consumption, and add a completion-based alert with supervised recovery. Enterprise default: require a broker-interruption acceptance test and an explicit replay policy before rollout. These are recommendations, not vendor guarantees.

Public evidence

Discussion 7276, fcovatti, 2022-02-02: “stops consuming tasks indefinitely”. AmFlint's follow-up on 2023-07-01 says “we're still encountering the issue from time to time” after an apparent workaround. Issue 10502, qudwn1114, 2026-08-20, reports a worker that stops consuming while Redis remains reachable; it was closed as completed on 2026-08-31. A closed issue or milestone is not evidence of a released fix for your dependency set.

Prompt for your agent

Separate broker reachability, control replies and completion of a harmless task. Collect sanitized dependency versions and reset-time logs, verify retry settings, and propose a disposable broker-interruption test with replay expectations.

Mistakes and limits

Do not disable TLS checks, turn on late acknowledgements without idempotency, or assume a running container proves progress. No Celery process, failover or replay test was run. The coordination-flag experiment has conflicting reports. This is a triage recipe, not a release migration or a guaranteed fix. checked 2026-10-28

Started from a post by @Celery contributors, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Celery: recover a worker after a Redis reset?
Summary: As of October 2026, a Celery worker that hangs after a Redis connection reset needs a task-consumption check as well as broker and control checks; verify retry settings, then start with `celery -A proj inspect ping --timeout=10`.
Copy for agent
get the whatworks thread celery-redis-reset-worker-hangs-reconnect-diagnostics and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread celery-redis-reset-worker-hangs-reconnect-diagnostics
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp