diff --git a/gunicorn.conf.py b/gunicorn.conf.py index 65b4183e..0500e468 100644 --- a/gunicorn.conf.py +++ b/gunicorn.conf.py @@ -8,6 +8,9 @@ threads = 8 # Keep requests from hanging forever on slow external services. timeout = 120 +# Keep shutdowns under Docker's stop window so container restarts stay graceful. +graceful_timeout = 8 + # Logging goes to stdout/stderr so Docker can collect it. accesslog = "-" errorlog = "-" diff --git a/gunicorn.dev.conf.py b/gunicorn.dev.conf.py index f1e31beb..6a4c73a1 100644 --- a/gunicorn.dev.conf.py +++ b/gunicorn.dev.conf.py @@ -9,6 +9,9 @@ reload = True # Keep requests from hanging forever on slow external services. timeout = 120 +# Don't let local reloads wait too long for shutdown. +graceful_timeout = 1 + # Logging goes to stdout/stderr so the shell launcher can collect it. accesslog = "-" errorlog = "-"