Jump to solution
Verify

The Fix

pip install celery==5.6.0

Based on closed celery/celery issue #9913 · PR/commit linked

Production note: This usually shows up under retries/timeouts. Treat it as a side-effect risk until you can verify behavior with a canary + real traffic.

Jump to Verify Open PR/Commit
@@ -189,7 +189,8 @@ def detach(path, argv, logfile=None, pidfile=None, uid=None, cls=CeleryOption, help_group="Worker Options", - help="Disable broker prefetching. The worker will only fetch a task when a process slot is available.") + help="Disable broker prefetching. The worker will only fetch a task when a process slot is available. " + "Only supported with Redis brokers.")
repro.py
Traceback (most recent call last): File "/root/.cache/pex/venvs/1/77c1204de41ed0caed2d14186cafc01873edd8be/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055/lib/python3.13/site-packages/celery/worker/worker.py", line 203, in start self.blueprint.start(self) ~~~~~~~~~~~~~~~~~~~~^^^^^^ File "/root/.cache/pex/venvs/1/77c1204de41ed0caed2d14186cafc01873edd8be/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055/lib/python3.13/site-packages/celery/bootsteps.py", line 116, in start step.start(parent) ~~~~~~~~~~^^^^^^^^ File "/root/.cache/pex/venvs/1/77c1204de41ed0caed2d14186cafc01873edd8be/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055/lib/python3.13/site-packages/celery/bootsteps.py", line 365, in start return self.obj.start() ~~~~~~~~~~~~~~^^ File "/root/.cache/pex/venvs/1/77c1204de41ed0caed2d14186cafc01873edd8be/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055/lib/python3.13/site-packages/celery/worker/consumer/consumer.py", line 341, in start blueprint.start(self) ~~~~~~~~~~~~~~~^^^^^^ File "/root/.cache/pex/venvs/1/77c1204de41ed0caed2d14186cafc01873edd8be/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055/lib/python3.13/site-packages/celery/bootsteps.py", line 116, in start step.start(parent) ~~~~~~~~~~^^^^^^^^ File "/root/.cache/pex/venvs/1/77c1204de41ed0caed2d14186cafc01873edd8be/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055/lib/python3.13/site-packages/celery/worker/consumer/tasks.py", line 58, in start channel_qos = c.task_consumer.channel.qos ^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'Channel' object has no attribute 'qos'
verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
fix.md
Option A — Upgrade to fixed release\npip install celery==5.6.0\nWhen NOT to use: This fix is not applicable if using brokers other than Redis.\n\n

Why This Fix Works in Production

  • Trigger: self.blueprint.start(self)
  • Mechanism: The original implementation assumed all broker channels would have the same interface as Redis channels
  • Why the fix works: Restricts the `--disable-prefetch` feature to Redis brokers only to resolve compatibility issues with RabbitMQ and other brokers. (first fixed release: 5.6.0).
Production impact:
  • If left unfixed, the same config can fail only in production (env differences), causing startup failures or partial feature outages.

Why This Breaks in Prod

  • Shows up under Python 3.13 in real deployments (not just unit tests).
  • The original implementation assumed all broker channels would have the same interface as Redis channels
  • Surfaces as: Traceback (most recent call last):

Proof / Evidence

  • GitHub issue: #9913
  • Fix PR: https://github.com/celery/celery/pull/9919
  • First fixed release: 5.6.0
  • Reproduced locally: No (not executed)
  • Last verified: 2026-02-08
  • Confidence: 0.75
  • Did this fix it?: Yes (upstream fix exists)
  • Own content ratio: 0.26

Discussion

High-signal excerpts from the issue thread (symptoms, repros, edge-cases).

“Ha in #9863 I only did test it on Redis properly, so I guess I can make it a Redis only feature, what do you…”
@Dkhodos · 2025-09-28 · source
“> Ha in #9863 I only did test it on Redis properly, so I guess I can make it a Redis only feature, what do…”
@auvipy · 2025-09-29 · source
“Fix ready, running CI https://github.com/celery/celery/pull/9919 FYI @auvipy @Nusnus”
@Dkhodos · 2025-09-29 · source

Failure Signature (Search String)

  • self.blueprint.start(self)

Error Message

Stack trace
error.txt
Error Message ------------- Traceback (most recent call last): File "/root/.cache/pex/venvs/1/77c1204de41ed0caed2d14186cafc01873edd8be/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055/lib/python3.13/site-packages/celery/worker/worker.py", line 203, in start self.blueprint.start(self) ~~~~~~~~~~~~~~~~~~~~^^^^^^ File "/root/.cache/pex/venvs/1/77c1204de41ed0caed2d14186cafc01873edd8be/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055/lib/python3.13/site-packages/celery/bootsteps.py", line 116, in start step.start(parent) ~~~~~~~~~~^^^^^^^^ File "/root/.cache/pex/venvs/1/77c1204de41ed0caed2d14186cafc01873edd8be/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055/lib/python3.13/site-packages/celery/bootsteps.py", line 365, in start return self.obj.start() ~~~~~~~~~~~~~~^^ File "/root/.cache/pex/venvs/1/77c1204de41ed0caed2d14186cafc01873edd8be/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055/lib/python3.13/site-packages/celery/worker/consumer/consumer.py", line 341, in start blueprint.start(self) ~~~~~~~~~~~~~~~^^^^^^ File "/root/.cache/pex/venvs/1/77c1204de41ed0caed2d14186cafc01873edd8be/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055/lib/python3.13/site-packages/celery/bootsteps.py", line 116, in start step.start(parent) ~~~~~~~~~~^^^^^^^^ File "/root/.cache/pex/venvs/1/77c1204de41ed0caed2d14186cafc01873edd8be/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055/lib/python3.13/site-packages/celery/worker/c ... (truncated) ...

Minimal Reproduction

repro.py
Traceback (most recent call last): File "/root/.cache/pex/venvs/1/77c1204de41ed0caed2d14186cafc01873edd8be/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055/lib/python3.13/site-packages/celery/worker/worker.py", line 203, in start self.blueprint.start(self) ~~~~~~~~~~~~~~~~~~~~^^^^^^ File "/root/.cache/pex/venvs/1/77c1204de41ed0caed2d14186cafc01873edd8be/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055/lib/python3.13/site-packages/celery/bootsteps.py", line 116, in start step.start(parent) ~~~~~~~~~~^^^^^^^^ File "/root/.cache/pex/venvs/1/77c1204de41ed0caed2d14186cafc01873edd8be/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055/lib/python3.13/site-packages/celery/bootsteps.py", line 365, in start return self.obj.start() ~~~~~~~~~~~~~~^^ File "/root/.cache/pex/venvs/1/77c1204de41ed0caed2d14186cafc01873edd8be/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055/lib/python3.13/site-packages/celery/worker/consumer/consumer.py", line 341, in start blueprint.start(self) ~~~~~~~~~~~~~~~^^^^^^ File "/root/.cache/pex/venvs/1/77c1204de41ed0caed2d14186cafc01873edd8be/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055/lib/python3.13/site-packages/celery/bootsteps.py", line 116, in start step.start(parent) ~~~~~~~~~~^^^^^^^^ File "/root/.cache/pex/venvs/1/77c1204de41ed0caed2d14186cafc01873edd8be/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055/lib/python3.13/site-packages/celery/worker/consumer/tasks.py", line 58, in start channel_qos = c.task_consumer.channel.qos ^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'Channel' object has no attribute 'qos'

Environment

  • Python: 3.13

What Broke

Using the --disable-prefetch option with RabbitMQ causes crashes and unexpected behavior.

Why It Broke

The original implementation assumed all broker channels would have the same interface as Redis channels

Fix Options (Details)

Option A — Upgrade to fixed release Safe default (recommended)

pip install celery==5.6.0

When NOT to use: This fix is not applicable if using brokers other than Redis.

Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.

Fix reference: https://github.com/celery/celery/pull/9919

First fixed release: 5.6.0

Last verified: 2026-02-08. Validate in your environment.

Get updates

We publish verified fixes weekly. No spam.

Subscribe

When NOT to Use This Fix

  • This fix is not applicable if using brokers other than Redis.

Verify Fix

verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.

Did This Fix Work in Your Case?

Quick signal helps us prioritize which fixes to verify and improve.

Prevention

  • Capture the exact failing error string in logs and tests so you can reproduce via a minimal script.
  • Pin production dependencies and upgrade only with a reproducible test that hits the failing path.

Version Compatibility Table

VersionStatus
5.6.0 Fixed

Related Issues

No related fixes found.

Sources

We don’t republish the full GitHub discussion text. Use the links above for context.