redis conf

This commit is contained in:
LE Quoc Dat 2025-04-24 01:40:01 +01:00
parent 48524afd51
commit d7f4ade6f7
1 changed files with 2 additions and 2 deletions

View File

@ -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