Increased default timeout values for Gunicorn configuration

- Doubled default timeout to 300 seconds
This commit is contained in:
yangdx
2025-03-21 15:26:23 +08:00
parent 0761af19c6
commit 1f6d230da1
2 changed files with 2 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ preload_app = True
worker_class = "uvicorn.workers.UvicornWorker" worker_class = "uvicorn.workers.UvicornWorker"
# Other Gunicorn configurations # Other Gunicorn configurations
timeout = int(os.getenv("TIMEOUT", 150)) # Default 150s to match run_with_gunicorn.py timeout = int(os.getenv("TIMEOUT", 150 * 2)) # Default 150s *2 to match run_with_gunicorn.py
keepalive = int(os.getenv("KEEPALIVE", 5)) # Default 5s keepalive = int(os.getenv("KEEPALIVE", 5)) # Default 5s
# Logging configuration # Logging configuration

View File

@@ -140,7 +140,7 @@ def main():
# Timeout configuration prioritizes command line arguments # Timeout configuration prioritizes command line arguments
gunicorn_config.timeout = ( gunicorn_config.timeout = (
args.timeout if args.timeout else int(os.getenv("TIMEOUT", 150)) args.timeout if args.timeout * 2 else int(os.getenv("TIMEOUT", 150 * 2))
) )
# Keepalive configuration # Keepalive configuration