Graceful shutdown timeout
The maximum time allowed for a process to shut down cleanly before the system escalates to a forced termination.
Definition
A graceful shutdown timeout is the maximum time a system allows a process to complete a graceful shutdown.
If the process does not exit in time, the system escalates to a forced shutdown.
Why it exists
Graceful shutdown is cooperative and can hang. Timeouts are there to keep deploys and restarts bounded.
Typical shape in production
Many systems do something like:
- Send
SIGTERMto request shutdown. - Wait up to N seconds for the process to exit cleanly.
- Send
SIGKILLif it is still running.
The exact values and behavior depend on the deployment wrapper and supervisor.