From 1fc86525647bb3918ab99ebdd371825330f8f264 Mon Sep 17 00:00:00 2001 From: Erosika Date: Thu, 5 Mar 2026 12:36:39 -0500 Subject: [PATCH] fix: retry on RuntimeError for stale Redis connections (Fixes HONCHO-18H) uvloop raises RuntimeError when a TCP transport is closed and redis-py's health check PING hits the stale connection. redis-py's default retry logic doesn't cover RuntimeError, so it propagated unhandled. Adding RuntimeError to retry_on_error causes redis-py to reconnect instead. Co-Authored-By: Claude Sonnet 4.6 --- src/cache/client.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cache/client.py b/src/cache/client.py index d4005fb1..9ee7f9b9 100644 --- a/src/cache/client.py +++ b/src/cache/client.py @@ -49,6 +49,7 @@ async def init_cache() -> None: cache.setup( settings.CACHE.URL, pickle_type=PicklerType.SQLALCHEMY, + retry_on_error=[RuntimeError], ) except Exception as setup_err: