The Fix
pip install celery==4.4.0rc5
Based on closed celery/celery issue #4735 · 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%.
@@ -29,6 +29,7 @@
try:
import redis
+ import redis.connection
from kombu.transport.redis import get_redis_error_classes
except ImportError: # pragma: no cover
Option A — Upgrade to fixed release\npip install celery==4.4.0rc5\nWhen NOT to use: Do not apply this fix if using a Redis version that does not support coercion.\n\n
Why This Fix Works in Production
- Trigger: Redis connection timeouts are not coerced correctly
- Mechanism: Celery incorrectly passes timeout values as strings instead of floats to the Redis client
- Why the fix works: Uses Redis's coercion mechanism for converting query parameters, ensuring that timeouts specified in the result backend URL are correctly interpreted as floats. (first fixed release: 4.4.0rc5).
- 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
- Celery incorrectly passes timeout values as strings instead of floats to the Redis client
- Production symptom (often without a traceback): Redis connection timeouts are not coerced correctly
Proof / Evidence
- GitHub issue: #4735
- Fix PR: https://github.com/celery/celery/pull/4736
- 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.78
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“Found using celery 4.1.0. ## Steps to reproduce Configure with redis as a backend with timeouts set in the url: ## Expected behavior Timeouts are applied and celery works normally. ## Actual behavior Errors are raised by the socket library”
Failure Signature (Search String)
- Redis connection timeouts are not coerced correctly
- Configure with redis as a backend with timeouts set in the url:
Copy-friendly signature
Failure Signature
-----------------
Redis connection timeouts are not coerced correctly
Configure with redis as a backend with timeouts set in the url:
Error Message
Signature-only (no traceback captured)
Error Message
-------------
Redis connection timeouts are not coerced correctly
Configure with redis as a backend with timeouts set in the url:
What Broke
Redis connection timeouts lead to socket errors and application failures.
Why It Broke
Celery incorrectly passes timeout values as strings instead of floats to the Redis client
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
pip install celery==4.4.0rc5
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/4736
First fixed release: 4.4.0rc5
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- Do not apply this fix if using a Redis version that does not support coercion.
Did This Fix Work in Your Case?
Quick signal helps us prioritize which fixes to verify and improve.
Prevention
- Make timeouts explicit and test them (unit + integration) to avoid silent behavior changes.
- Instrument retries (attempt count + reason) and alert on spikes to catch dependency slowdowns.
Version Compatibility Table
| Version | Status |
|---|---|
| 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.