diff --git a/server.py b/server.py index 9ea7e5c..dee1dfc 100644 --- a/server.py +++ b/server.py @@ -66,7 +66,9 @@ parsed = urlparse(REDIS_URL) redis_client = redis.Redis( host=parsed.hostname or 'localhost', port=parsed.port or 6379, - db=int(parsed.path.lstrip('/') or 0) + db=int(parsed.path.lstrip('/') or 0), + socket_timeout=5, + socket_connect_timeout=5 ) RUNS_KEY_PREFIX = "artdag:run:" RECIPES_KEY_PREFIX = "artdag:recipe:" @@ -3986,4 +3988,4 @@ async def ui_run_partial(run_id: str, request: Request): if __name__ == "__main__": import uvicorn - uvicorn.run(app, host="0.0.0.0", port=8100) + uvicorn.run(app, host="0.0.0.0", port=8100, workers=4)