Jump to solution
Verify

The Fix

Upgrade to version 0.15.0 or later.

Based on closed Kludex/uvicorn issue #852 · PR/commit linked

Production note: Most teams hit this during upgrades or environment changes. Roll out with a canary and smoke critical endpoints (health, OpenAPI/docs) before 100%.

Jump to Verify Open PR/Commit
@@ -75,6 +75,7 @@ def restart(self) -> None: def shutdown(self) -> None: + self.process.terminate() self.process.join() message = "Stopping reloader process [{}]".format(str(self.pid))
repro
Run `uvicorn app:app --workers 2 --log-level=debug` Get the ppid in the logs `INFO: Started parent process [38237]` Send the SIGTERM `kill -15 38237`
verify
Follow the reproduction steps, confirm the failure, apply the fix, and repeat the same steps to verify the behavior changes.
fix.md
Option A — Upgrade to fixed release\nUpgrade to version 0.15.0 or later.\nWhen NOT to use: This fix should not be applied if the application requires a different shutdown behavior.\n\n

Why This Fix Works in Production

  • Trigger: Sending SIGTERM to parent process when running with --workers hangs indefinitely
  • Mechanism: The parent process does not propagate SIGTERM to child processes, causing indefinite hangs
  • Why the fix works: Fixes the issue of hanging processes on SIGTERM by ensuring supervisors terminate their processes before joining them. (first fixed release: 0.15.0).
Production impact:
  • If left unfixed, the same config can fail only in production (env differences), causing startup failures or partial feature outages.

Why This Breaks in Prod

  • Shows up under Python 3.8.6 in real deployments (not just unit tests).
  • The parent process does not propagate SIGTERM to child processes, causing indefinite hangs
  • Production symptom (often without a traceback): Sending SIGTERM to parent process when running with --workers hangs indefinitely

Proof / Evidence

  • GitHub issue: #852
  • Fix PR: https://github.com/kludex/uvicorn/pull/1069
  • First fixed release: 0.15.0
  • Reproduced locally: No (not executed)
  • Last verified: 2026-02-09
  • Confidence: 0.85
  • Did this fix it?: Yes (upstream fix exists)
  • Own content ratio: 0.71

Discussion

High-signal excerpts from the issue thread (symptoms, repros, edge-cases).

“Commenting for notifications - I'd really like to see #853's work accepted 'n' merged. (But am too stupid to help of course).”
@Asday · 2021-02-13 · confirmation · source
“yep we got a problem with SIGTERM, and not just in docker: it was discovered 1st as a docker issue because it's the default signal…”
@euri10 · 2021-01-10 · source
“Ugh deja vu from last year. Child processes no longer getting signals, and not exiting cleanly. It's unfortunate your additions were reverted. Can confirm this…”
@gnat · 2021-01-09 · source
“@sgsabbage Seems easy enough to test your theory right? Spin up a docker environment and see if it hangs on termination, then make your change…”
@Asday · 2021-06-03 · source

Failure Signature (Search String)

  • Sending SIGTERM to parent process when running with --workers hangs indefinitely
  • In other words, remove anything that doesn't make the bug go away.
Copy-friendly signature
signature.txt
Failure Signature ----------------- Sending SIGTERM to parent process when running with --workers hangs indefinitely In other words, remove anything that doesn't make the bug go away.

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- Sending SIGTERM to parent process when running with --workers hangs indefinitely In other words, remove anything that doesn't make the bug go away.

Minimal Reproduction

  1. Run `uvicorn app:app --workers 2 --log-level=debug`
  2. Get the ppid in the logs `INFO: Started parent process [38237]`
  3. Send the SIGTERM `kill -15 38237`

Environment

  • Python: 3.8.6

What Broke

Sending SIGTERM results in the application hanging indefinitely without a graceful shutdown.

Why It Broke

The parent process does not propagate SIGTERM to child processes, causing indefinite hangs

Fix Options (Details)

Option A — Upgrade to fixed release Safe default (recommended)

Upgrade to version 0.15.0 or later.

When NOT to use: This fix should not be applied if the application requires a different shutdown behavior.

Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.

Fix reference: https://github.com/kludex/uvicorn/pull/1069

First fixed release: 0.15.0

Last verified: 2026-02-09. Validate in your environment.

Get updates

We publish verified fixes weekly. No spam.

Subscribe

When NOT to Use This Fix

  • This fix should not be applied if the application requires a different shutdown behavior.

Verify Fix

verify
Follow the reproduction steps, confirm the failure, apply the fix, and repeat the same steps to verify the behavior changes.

Did This Fix Work in Your Case?

Quick signal helps us prioritize which fixes to verify and improve.

Prevention

  • Capture the exact failing error string in logs and tests so you can reproduce via a minimal script.
  • Pin production dependencies and upgrade only with a reproducible test that hits the failing path.

Version Compatibility Table

VersionStatus
0.15.0 Fixed

Related Issues

No related fixes found.

Sources

We don’t republish the full GitHub discussion text. Use the links above for context.