diff --git a/db/config.py b/db/config.py index 382aa8e0..971154f6 100644 --- a/db/config.py +++ b/db/config.py @@ -44,7 +44,7 @@ class Settings(BaseSettings): mongo_uri: str db_max_connections: int = 50 redis_url: str = "redis://redis-service:6379" - redis_max_connections: int = 50 + redis_max_connections: int = 100 # External Service URLs scraper_proxy_url: str | None = None diff --git a/db/redis_database.py b/db/redis_database.py index e59b3392..442cc12c 100644 --- a/db/redis_database.py +++ b/db/redis_database.py @@ -10,6 +10,7 @@ "health_check_interval": 30, # Health check every 30 seconds "retry_on_timeout": True, "decode_responses": False, # Automatically decode responses to Python strings + "retry_on_error": [redis.exceptions.ConnectionError], # Retry on connection errors } # Create sync client with connection pooling