From d7f4ade6f793ededa6281512feb80640c34eb1f7 Mon Sep 17 00:00:00 2001 From: LE Quoc Dat Date: Thu, 24 Apr 2025 01:40:01 +0100 Subject: [PATCH] redis conf --- backend/services/redis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/services/redis.py b/backend/services/redis.py index e9a139bf..b380bda1 100644 --- a/backend/services/redis.py +++ b/backend/services/redis.py @@ -77,11 +77,11 @@ def initialize(): ssl=os.getenv('REDIS_SSL', 'True').lower() == 'true', ssl_ca_certs=certifi.where(), decode_responses=True, - socket_timeout=None, # Changed from 5.0 to None to let listen() block indefinitely + socket_timeout=5.0, socket_connect_timeout=5.0, # Connection timeout retry_on_timeout=True, # Auto-retry on timeout health_check_interval=30, # Check connection health every 30 seconds - max_connections=1000 # Limit connections to prevent overloading + max_connections=200 # Limit connections to prevent overloading ) return client