From 1ec691209a04e8e96189caaec6ae6881b96afef0 Mon Sep 17 00:00:00 2001 From: silentoplayz Date: Mon, 8 Jun 2026 07:30:03 -0400 Subject: [PATCH] fix(redis): use await asyncio.sleep() instead of time.sleep() in async generator time.sleep() inside the _wrap_async_gen() async generator blocks the entire event loop during Sentinel failover retries. The sibling method _wrap_async_call() already correctly uses await asyncio.sleep(). --- backend/open_webui/utils/redis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/utils/redis.py b/backend/open_webui/utils/redis.py index f2ac75410e..1417be134c 100644 --- a/backend/open_webui/utils/redis.py +++ b/backend/open_webui/utils/redis.py @@ -185,7 +185,7 @@ class SentinelRedisProxy: if proxy._should_retry(attempt): proxy._log_retry(exc, attempt) if REDIS_RECONNECT_DELAY: - time.sleep(REDIS_RECONNECT_DELAY / 1000) + await asyncio.sleep(REDIS_RECONNECT_DELAY / 1000) continue proxy._log_exhausted(exc) raise