T43 Dec 24, 2025 2 min read

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:

  1. Send SIGTERM to request shutdown.
  2. Wait up to N seconds for the process to exit cleanly.
  3. Send SIGKILL if it is still running.

The exact values and behavior depend on the deployment wrapper and supervisor.