Jump to solution
Verify

The Fix

pip install celery==5.2.0rc2

Based on closed celery/celery issue #6836 · 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
@@ -294,7 +294,7 @@ def __repr__(self): False, type='bool' ), - concurrency=Option(0, type='int'), + concurrency=Option(None, type='int'), consumer=Option('celery.worker.consumer:Consumer', type='string'),
repro.py
from celery import Celery, signals from click import Option import codecs import yaml def setup(yml_path: str): global CONF with codecs.open(yml_path, "r", "utf-8") as config_file: CONF = yaml.load(config_file, Loader=yaml.FullLoader) def load_config(yml_path: str): conf =setup(yml_path) # Load conf file from custom yaml celery_config = conf.get("celery", {}) app_config = celery_config.get("app", {}) app.conf.update(app_config) return conf def _create_celery(): app = Celery(include=["ais.tasks"]) app.user_options["preload"] = [ Option(["--config", "-C"], default="config/config.yml") ] return app """ signal handlers Warning: signal handlers only executed on server side """ @signals.user_preload_options.connect def handle_preload_options(options, **kwargs): load_config(options["config"]) app = _create_celery()
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.2.0rc2\nWhen NOT to use: Do not apply this fix if your application relies on a concurrency value of 0.\n\n

Why This Fix Works in Production

  • Trigger: - [x] I have included all related issues and possible duplicate issues
  • Mechanism: The default value of the worker concurrency option was incorrectly set to 0 instead of None
  • Why the fix works: This fix changes the default value of the worker concurrency option from 0 to None, allowing the either method to correctly resolve in favor of app.conf.worker_concurrency value. (first fixed release: 5.2.0rc2).
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.9 in real deployments (not just unit tests).
  • The default value of the worker concurrency option was incorrectly set to 0 instead of None
  • Production symptom (often without a traceback): - [x] I have included all related issues and possible duplicate issues

Proof / Evidence

  • GitHub issue: #6836
  • Fix PR: https://github.com/celery/celery/pull/6853
  • First fixed release: 5.2.0rc2
  • 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.52

Discussion

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

“Hey @wangha81 :wave:, Thank you for opening an issue”
@open-collective-bot · 2021-07-01 · source
“Sorry, I don't know which behaviors below is right - the value at click step would set if worker_concurrency was given - this.concurrency = either('worker_concurrency',…”
@wangha81 · 2021-07-02 · source

Failure Signature (Search String)

  • - [x] I have included all related issues and possible duplicate issues
  • or possible duplicates to this issue as requested by the checklist above.
Copy-friendly signature
signature.txt
Failure Signature ----------------- - [x] I have included all related issues and possible duplicate issues or possible duplicates to this issue as requested by the checklist above.

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- - [x] I have included all related issues and possible duplicate issues or possible duplicates to this issue as requested by the checklist above.

Minimal Reproduction

repro.py
from celery import Celery, signals from click import Option import codecs import yaml def setup(yml_path: str): global CONF with codecs.open(yml_path, "r", "utf-8") as config_file: CONF = yaml.load(config_file, Loader=yaml.FullLoader) def load_config(yml_path: str): conf =setup(yml_path) # Load conf file from custom yaml celery_config = conf.get("celery", {}) app_config = celery_config.get("app", {}) app.conf.update(app_config) return conf def _create_celery(): app = Celery(include=["ais.tasks"]) app.user_options["preload"] = [ Option(["--config", "-C"], default="config/config.yml") ] return app """ signal handlers Warning: signal handlers only executed on server side """ @signals.user_preload_options.connect def handle_preload_options(options, **kwargs): load_config(options["config"]) app = _create_celery()

Environment

  • Python: 3.9

What Broke

Workers may not respect the configured concurrency settings, leading to performance issues.

Why It Broke

The default value of the worker concurrency option was incorrectly set to 0 instead of None

Fix Options (Details)

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

pip install celery==5.2.0rc2

When NOT to use: Do not apply this fix if your application relies on a concurrency value of 0.

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

First fixed release: 5.2.0rc2

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

  • Do not apply this fix if your application relies on a concurrency value of 0.

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.2.0rc2 Fixed

Related Issues

No related fixes found.

Sources

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