Jump to solution
Verify

The Fix

pip install celery==4.4.7

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

Production note: Most teams hit this during upgrades or environment changes. Roll out with a canary and smoke critical endpoints (health, OpenAPI/docs) before 100%.

Jump to Verify Open PR/Commit
@@ -0,0 +1,53 @@ @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +"""Tasks auto-retry functionality.""" +from vine.utils import wraps
repro.py
class MyTask(Task): name = "MY_TASK" autoretry_for = (Exception, ) retry_kwargs = {'max_retries': 5} retry_backoff = True retry_backoff_max = 700 retry_jitter = False def run(self, *args, **kwargs): pass # do something # return some value def on_failure(self, exc, task_id, args, kwargs, einfo): # can extend failure method if needed super().on_failure(exc, task_id, args, kwargs, einfo) app.tasks.register(MyTask())
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==4.4.7\nWhen NOT to use: This fix is not applicable if using function-based tasks with retry logic.\n\n

Why This Fix Works in Production

  • Trigger: autoretry_for = (Exception, )
  • Mechanism: Auto-retry functionality was not applied to class-based tasks in Celery
  • Why the fix works: The pull request adds auto-retry functionality to class-based tasks in Celery, addressing the issue where such tasks were not retrying on exceptions. (first fixed release: 4.4.7).
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

  • Auto-retry functionality was not applied to class-based tasks in Celery
  • Production symptom (often without a traceback): autoretry_for = (Exception, )

Proof / Evidence

  • GitHub issue: #6117
  • Fix PR: https://github.com/celery/celery/pull/6233
  • First fixed release: 4.4.7
  • Reproduced locally: No (not executed)
  • Last verified: 2026-02-09
  • Confidence: 0.85
  • Did this fix it?: Yes (upstream fix exists)
  • Own content ratio: 0.60

Discussion

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

“It's not an issue”
@mchataigner · 2020-05-25 · source
“My bad, I missed that, sorry. @auvipy could you reopen this issue?”
@mchataigner · 2020-05-26 · source
“I'm having the same issue. Autoretry works when I define the task with decorator but not when I set the attributes on a Task extending…”
@umluizlima · 2020-06-01 · source
“@mchataigner Then what is the purpose of autoretry_for=(Exception, ). I defined it in my task class, So the task should retry in case of an…”
@nanduajith · 2020-05-26 · source

Failure Signature (Search String)

  • autoretry_for = (Exception, )
Copy-friendly signature
signature.txt
Failure Signature ----------------- autoretry_for = (Exception, ) def on_failure(self, exc, task_id, args, kwargs, einfo):

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- autoretry_for = (Exception, ) def on_failure(self, exc, task_id, args, kwargs, einfo):

Minimal Reproduction

repro.py
class MyTask(Task): name = "MY_TASK" autoretry_for = (Exception, ) retry_kwargs = {'max_retries': 5} retry_backoff = True retry_backoff_max = 700 retry_jitter = False def run(self, *args, **kwargs): pass # do something # return some value def on_failure(self, exc, task_id, args, kwargs, einfo): # can extend failure method if needed super().on_failure(exc, task_id, args, kwargs, einfo) app.tasks.register(MyTask())

What Broke

Class-based tasks did not retry on exceptions, leading to task failures.

Why It Broke

Auto-retry functionality was not applied to class-based tasks in Celery

Fix Options (Details)

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

pip install celery==4.4.7

When NOT to use: This fix is not applicable if using function-based tasks with retry logic.

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/6233

First fixed release: 4.4.7

Last verified: 2026-02-09. 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 function-based tasks with retry logic.

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
4.4.7 Fixed

Related Issues

No related fixes found.

Sources

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