diff --git a/conf/aether_fastapi_gunicorn_conf.py b/conf/aether_fastapi_gunicorn_conf.py index 9992672..0cb6df5 100644 --- a/conf/aether_fastapi_gunicorn_conf.py +++ b/conf/aether_fastapi_gunicorn_conf.py @@ -16,7 +16,7 @@ chdir = "/srv/aether_api" wsgi_app = "app.main:app" # Numeric variables must be integers -timeout = int(os.getenv('AE_API_GUNICORN_TIMEOUT', 30)) +timeout = int(os.getenv('AE_API_GUNICORN_TIMEOUT', 120)) graceful_timeout = int(os.getenv('AE_API_GUNICORN_GRACEFUL_TIMEOUT', 30)) keepalive = int(os.getenv('AE_API_GUNICORN_KEEPALIVE', 4)) diff --git a/conf/nginx/site-enabled_aether_fastapi_gunicorn.conf b/conf/nginx/site-enabled_aether_fastapi_gunicorn.conf index 4031f58..9f855c0 100644 --- a/conf/nginx/site-enabled_aether_fastapi_gunicorn.conf +++ b/conf/nginx/site-enabled_aether_fastapi_gunicorn.conf @@ -50,6 +50,10 @@ server { # proxy read timeout being too low will cause 504 Gateway Time-out on the client browser proxy_read_timeout 2100s; + # proxy_send_timeout and send_timeout default to 60s. For long-running endpoints + # (clip_video, ffmpeg operations that take 5-40 min), raise to match proxy_read_timeout. + proxy_send_timeout 2100s; + send_timeout 2100s; proxy_pass http://fastapi_backend; }