Jump to solution
Details

The Fix

pip install celery==4.4.0rc5

Based on closed celery/celery issue #4668 · 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%.

Open PR/Commit
@@ -6,7 +6,7 @@ from kombu.exceptions import EncodeError from kombu.utils.objects import cached_property -from kombu.utils.url import maybe_sanitize_url +from kombu.utils.url import maybe_sanitize_url, urlparse
fix.md
Option A — Upgrade to fixed release\npip install celery==4.4.0rc5\nWhen NOT to use: This fix is not applicable if the MongoDB connection string does not use the 'srv' scheme.\n\n

Why This Fix Works in Production

  • Trigger: MongoDB backend does not support mongodb+srv:// URL's
  • Mechanism: The MongoDB backend did not parse connection strings with the 'srv' scheme correctly
  • Why the fix works: The MongoDB backend now accepts connection strings starting with the 'srv' scheme, resolving issue #4668. (first fixed release: 4.4.0rc5).
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

  • The MongoDB backend did not parse connection strings with the 'srv' scheme correctly
  • Production symptom (often without a traceback): MongoDB backend does not support mongodb+srv:// URL's

Proof / Evidence

  • GitHub issue: #4668
  • Fix PR: https://github.com/celery/celery/pull/4744
  • First fixed release: 4.4.0rc5
  • 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.74

Discussion

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

“Could you please elaborate on the proposed URL format? Some references would be nice as well.”
@georgepsarakis · 2018-04-18 · source
“@georgepsarakis it's documented here: https://docs.mongodb.com/manual/reference/connection-string/#dns-seedlist-connection-format”
@digitalresistor · 2018-04-18 · source
“Has there been any movement on this at all?”
@digitalresistor · 2019-03-11 · source

Failure Signature (Search String)

  • MongoDB backend does not support mongodb+srv:// URL's
  • ```mongodb+srv://mongo.private.corp.example.com/celery?ssl=false```
Copy-friendly signature
signature.txt
Failure Signature ----------------- MongoDB backend does not support mongodb+srv:// URL's ```mongodb+srv://mongo.private.corp.example.com/celery?ssl=false```

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- MongoDB backend does not support mongodb+srv:// URL's ```mongodb+srv://mongo.private.corp.example.com/celery?ssl=false```

What Broke

Attempts to connect using 'mongodb+srv://' resulted in connection errors.

Why It Broke

The MongoDB backend did not parse connection strings with the 'srv' scheme correctly

Fix Options (Details)

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

pip install celery==4.4.0rc5

When NOT to use: This fix is not applicable if the MongoDB connection string does not use the 'srv' scheme.

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

First fixed release: 4.4.0rc5

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 the MongoDB connection string does not use the 'srv' scheme.

Did This Fix Work in Your Case?

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

Prevention

  • Add a TLS smoke test that performs a real handshake in CI (include CA bundle validation and hostname checks).
  • Alert on handshake failures by error string and endpoint to catch cert/CA changes quickly.

Version Compatibility Table

VersionStatus
4.4.0rc5 Fixed

Related Issues

No related fixes found.

Sources

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