Jump to solution
Verify

The Fix

pip install redis==7.1.0

Based on closed redis/redis-py issue #2233 · 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
@@ -17,7 +17,13 @@ from redis.asyncio.client import ResponseCallbackT -from redis.asyncio.connection import Connection, DefaultParser, Encoder, parse_url +from redis.asyncio.connection import ( + Connection,
repro.py
import asyncio from redis.asyncio.cluster import RedisCluster as AsyncRedisCluster redis_cluster = AsyncRedisCluster.from_url( "rediss://:REDACTED@clustercfg.REDACTED.REDACTED.REDACTED.cache.amazonaws.com:6379", decode_responses=True, require_full_coverage=False ) async def go(): await redis_cluster.initialize() await redis_cluster.ping() asyncio.run(go())
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 redis==7.1.0\nWhen NOT to use: This fix should not be applied if the application does not require SSL connections.\n\n

Why This Fix Works in Production

  • Trigger: Looks like you're using SSL, which is currently broken in async cluster. I've already raised a PR.
  • Mechanism: SSL handling in the asyncio RedisCluster client was improperly implemented, causing hangs during initialization
  • Why the fix works: Fixed SSL handling in the asyncio RedisCluster client to prevent hanging connections when connecting to Amazon Elasticache. (first fixed release: 7.1.0).
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.11 in real deployments (not just unit tests).
  • SSL handling in the asyncio RedisCluster client was improperly implemented, causing hangs during initialization
  • Production symptom (often without a traceback): Looks like you're using SSL, which is currently broken in async cluster. I've already raised a PR.

Proof / Evidence

  • GitHub issue: #2233
  • Fix PR: https://github.com/redis/redis-py/pull/2217
  • First fixed release: 7.1.0
  • Reproduced locally: No (not executed)
  • Last verified: 2026-02-07
  • Confidence: 0.85
  • Did this fix it?: Yes (upstream fix exists)
  • Own content ratio: 0.66

Discussion

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

“Thanks! I've updated the PR, should be fixed now.”
@utkarshgupta137 · 2022-06-17 · confirmation · source
“This is included in version 4.4.0rc1 I hope a stable version will be released soon”
@dvora-h · 2022-08-29 · confirmation · source
“Looks like you're using SSL, which is currently broken in async cluster. I've already raised a PR. Fixed by: https://github.com/redis/redis-py/pull/2217”
@utkarshgupta137 · 2022-06-15 · source
“I faced the same problem on my on-premise Redis cluster with password auth: - works fine with blocking RedisCluster - fails to connect via async…”
@wckdman · 2022-06-17 · source

Failure Signature (Search String)

  • Looks like you're using SSL, which is currently broken in async cluster. I've already raised a PR.
  • - fails to connect via async RedisCluster: `RedisClusterException: Redis Cluster cannot be connected. Please provide at least one reachable node.`
Copy-friendly signature
signature.txt
Failure Signature ----------------- Looks like you're using SSL, which is currently broken in async cluster. I've already raised a PR. - fails to connect via async RedisCluster: `RedisClusterException: Redis Cluster cannot be connected. Please provide at least one reachable node.`

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- Looks like you're using SSL, which is currently broken in async cluster. I've already raised a PR. - fails to connect via async RedisCluster: `RedisClusterException: Redis Cluster cannot be connected. Please provide at least one reachable node.`

Minimal Reproduction

repro.py
import asyncio from redis.asyncio.cluster import RedisCluster as AsyncRedisCluster redis_cluster = AsyncRedisCluster.from_url( "rediss://:REDACTED@clustercfg.REDACTED.REDACTED.REDACTED.cache.amazonaws.com:6379", decode_responses=True, require_full_coverage=False ) async def go(): await redis_cluster.initialize() await redis_cluster.ping() asyncio.run(go())

Environment

  • Python: 3.9.11

What Broke

The asyncio RedisCluster client hangs indefinitely when connecting to Amazon Elasticache, leading to application timeouts.

Why It Broke

SSL handling in the asyncio RedisCluster client was improperly implemented, causing hangs during initialization

Fix Options (Details)

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

pip install redis==7.1.0

When NOT to use: This fix should not be applied if the application does not require SSL connections.

Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.

Option D — Guard side-effects with OnceOnly Guardrail for side-effects

Mitigate duplicate external side-effects under retries/timeouts/agent loops by gating the operation before calling external systems.

  • Place OnceOnly between your code/agent and real side-effects (Stripe, emails, CRM, APIs).
  • Use a stable key per side-effect (e.g., customer_id + action + idempotency_key).
  • Fail-safe: configure fail-open vs fail-closed based on blast radius and spend risk.
Show example snippet (optional)
onceonly.py
from onceonly import OnceOnly import os once = OnceOnly(api_key=os.environ["ONCEONLY_API_KEY"], fail_open=True) # Stable idempotency key per real side-effect. # Use a request id / job id / webhook delivery id / Stripe event id, etc. event_id = "evt_..." # replace key = f"stripe:webhook:{event_id}" res = once.check_lock(key=key, ttl=3600) if res.duplicate: return {"status": "already_processed"} # Safe to execute the side-effect exactly once. handle_event(event_id)

See OnceOnly SDK

When NOT to use: Do not use this to hide logic bugs or data corruption. Use it to block duplicate external side-effects and enforce tool permissions/spend caps.

Fix reference: https://github.com/redis/redis-py/pull/2217

First fixed release: 7.1.0

Last verified: 2026-02-07. Validate in your environment.

Get updates

We publish verified fixes weekly. No spam.

Subscribe

When NOT to Use This Fix

  • This fix should not be applied if the application does not require SSL connections.
  • Do not use this to hide logic bugs or data corruption. Use it to block duplicate external side-effects and enforce tool permissions/spend caps.

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

  • 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.
  • Add a stress test that runs high-concurrency workloads and fails on thread dumps / blocked locks.
  • Enable watchdog dumps in prod (faulthandler, thread dump endpoint) to capture deadlocks quickly.

Version Compatibility Table

VersionStatus
7.1.0 Fixed

Related Issues

No related fixes found.

Sources

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