The Fix
pip install celery==4.4.0rc5
Based on closed celery/celery issue #4707 · 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%.
@@ -711,6 +711,8 @@ def send_task(self, name, args=None, kwargs=None, countdown=None,
'task_always_eager has no effect on send_task',
), stacklevel=2)
+
+ ignored_result = options.pop('ignore_result', False)
options = router.route(
"""Celery tasks module."""
from celery import Celery
from kombu import Queue
from redis import StrictRedis
from time import sleep
class CeleryConfig(object):
# celery configurations
broker_url = 'redis://localhost:6379/1'
task_default_queue = 'default'
task_queues = (
Queue('default', routing_key='parent.#,opbeat'),
)
imports = ('tasks',)
result_backend = 'redis://localhost:6379/2'
def create_app(config):
"""Create a celery app instance."""
celery_app = Celery("tasks")
celery_app.config_from_object(config)
return celery_app
app = create_app(CeleryConfig)
@app.task(ignore_result=True)
def enrich_single_call(data):
"""Single call to task that returns nothing. """
pass
def run_test_task():
"""Run test task."""
redis = StrictRedis()
channels_before = len(redis.execute_command('PUBSUB CHANNELS'))
print('Redis channels count before task execution {}'.format(channels_before))
result = enrich_single_call.delay('hello')
sleep(5)
channels_after = len(redis.execute_command('PUBSUB CHANNELS'))
print('Redis channels count after execution {}'.format(channels_after))
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
Option A — Upgrade to fixed release\npip install celery==4.4.0rc5\nWhen NOT to use: This fix should not be used if task results are required to be retrieved.\n\n
Why This Fix Works in Production
- Trigger: redis backend does not unsubscribe from celery-task-meta-XXX channels when ignore_result=True
- Mechanism: The Redis backend was not unsubscribing from channels when task results were ignored, leading to resource issues
- Why the fix works: The fix prevents unnecessary Redis channel subscriptions when task results are ignored, addressing resource issues caused by growing subscriptions. (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
- The Redis backend was not unsubscribing from channels when task results were ignored, leading to resource issues
- Production symptom (often without a traceback): redis backend does not unsubscribe from celery-task-meta-XXX channels when ignore_result=True
Proof / Evidence
- GitHub issue: #4707
- Fix PR: https://github.com/celery/celery/pull/4709
- 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.42
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“@mleginus this issue has been closed for some time now. Would you mind opening a new issue, so that we can continue the discussion there?…”
“I think I found the root cause and managed to solve this, but I need to consider my solution once more. I will certainly follow…”
“@bartloop if possible, please provide some feedback on the potential fix. Thank you!”
“@bartloop if you think that the documentation can be expanded, to help avoid similar issues in the future, please feel free to open a Pull…”
Failure Signature (Search String)
- redis backend does not unsubscribe from celery-task-meta-XXX channels when ignore_result=True
- If the unsubscribe doesn't happen, the list of subscriptions grows without end, causing resource issues after several hundred thousand tasks.
Copy-friendly signature
Failure Signature
-----------------
redis backend does not unsubscribe from celery-task-meta-XXX channels when ignore_result=True
If the unsubscribe doesn't happen, the list of subscriptions grows without end, causing resource issues after several hundred thousand tasks.
Error Message
Signature-only (no traceback captured)
Error Message
-------------
redis backend does not unsubscribe from celery-task-meta-XXX channels when ignore_result=True
If the unsubscribe doesn't happen, the list of subscriptions grows without end, causing resource issues after several hundred thousand tasks.
Minimal Reproduction
"""Celery tasks module."""
from celery import Celery
from kombu import Queue
from redis import StrictRedis
from time import sleep
class CeleryConfig(object):
# celery configurations
broker_url = 'redis://localhost:6379/1'
task_default_queue = 'default'
task_queues = (
Queue('default', routing_key='parent.#,opbeat'),
)
imports = ('tasks',)
result_backend = 'redis://localhost:6379/2'
def create_app(config):
"""Create a celery app instance."""
celery_app = Celery("tasks")
celery_app.config_from_object(config)
return celery_app
app = create_app(CeleryConfig)
@app.task(ignore_result=True)
def enrich_single_call(data):
"""Single call to task that returns nothing. """
pass
def run_test_task():
"""Run test task."""
redis = StrictRedis()
channels_before = len(redis.execute_command('PUBSUB CHANNELS'))
print('Redis channels count before task execution {}'.format(channels_before))
result = enrich_single_call.delay('hello')
sleep(5)
channels_after = len(redis.execute_command('PUBSUB CHANNELS'))
print('Redis channels count after execution {}'.format(channels_after))
What Broke
The number of Redis pubsub channels grew indefinitely, causing resource exhaustion.
Why It Broke
The Redis backend was not unsubscribing from channels when task results were ignored, leading to resource issues
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/4709
First fixed release: 4.4.0rc5
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- This fix should not be used if task results are required to be retrieved.
Verify Fix
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
| 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.