Jump to solution
Verify

The Fix

Upgrade to version 0.11.4 or later.

Based on closed Kludex/uvicorn issue #239 · 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
@@ -4,7 +4,7 @@ Server deployment is a complex area, that will depend on what kind of service yo As a general rule, you probably want to: -* Run `uvicorn --debug` from the command line for local development. +* Run `uvicorn --reload` from the command line for local development. * Run `gunicorn -k uvicorn.workers.UvicornWorker` for production.
repro.py
import logging from app import settings from app.settings import database from starlette.applications import Starlette from starlette.responses import JSONResponse logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) app = Starlette() app.debug = settings.DEBUG @app.on_event("startup") async def startup(): logger.debug('in startup') await database.connect() @app.on_event("shutdown") async def shutdown(): logger.debug('in shutdown') await database.disconnect() @app.route("/") async def root(request): logger.debug("1st") return JSONResponse({"message": "Hello"})
verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
fix.md
Option A — Upgrade to fixed release\nUpgrade to version 0.11.4 or later.\nWhen NOT to use: This fix should not be used if the application relies on the previous debug behavior.\n\n

Why This Fix Works in Production

  • Trigger: It looks like the reloader parent gets the kill signal when it sends the kill signal to the child. The child exits correctly, but the parent also stops the…
  • Mechanism: The reloader parent process incorrectly stops when the child process exits, causing issues in reloading
  • Why the fix works: The `--reload` command line option replaces `--debug`, allowing for auto-reloading during local development. (first fixed release: 0.11.4).
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.7.0 in real deployments (not just unit tests).
  • The reloader parent process incorrectly stops when the child process exits, causing issues in reloading
  • Production symptom (often without a traceback): It looks like the reloader parent gets the kill signal when it sends the kill signal to the child. The child exits correctly, but the parent also stops the reloader process and leaves a new child hanging.

Proof / Evidence

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

Discussion

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

“Amazing - gave it a try and it *also* resolves being able to run the reloader when using uvicorn programmatically”
@lovelydinosaur · 2019-03-03 · confirmation · source
“@tomchristie I was only able to reproduce it on 3.7.0 and 3.7.1 while running in pycharms debugger. If I just use run instead of the…”
@jared-mackey · 2018-11-05 · source
“May be related to this python bug: https://bugs.python.org/issue31489”
@jared-mackey · 2018-10-30 · source
“Doesn't appear to replicate for me. What platform, python version, etc? !screen shot 2018-11-05 at 12 17 29”
@lovelydinosaur · 2018-11-05 · source

Failure Signature (Search String)

  • It looks like the reloader parent gets the kill signal when it sends the kill signal to the child. The child exits correctly, but the parent also stops the reloader process and
  • Doesn't appear to replicate for me. What platform, python version, etc?
Copy-friendly signature
signature.txt
Failure Signature ----------------- It looks like the reloader parent gets the kill signal when it sends the kill signal to the child. The child exits correctly, but the parent also stops the reloader process and leaves a new child hanging. Doesn't appear to replicate for me. What platform, python version, etc?

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- It looks like the reloader parent gets the kill signal when it sends the kill signal to the child. The child exits correctly, but the parent also stops the reloader process and leaves a new child hanging. Doesn't appear to replicate for me. What platform, python version, etc?

Minimal Reproduction

repro.py
import logging from app import settings from app.settings import database from starlette.applications import Starlette from starlette.responses import JSONResponse logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) app = Starlette() app.debug = settings.DEBUG @app.on_event("startup") async def startup(): logger.debug('in startup') await database.connect() @app.on_event("shutdown") async def shutdown(): logger.debug('in shutdown') await database.disconnect() @app.route("/") async def root(request): logger.debug("1st") return JSONResponse({"message": "Hello"})

Environment

  • Python: 3.7.0

What Broke

Reloader fails to reload after the first change, leading to downtime during development.

Why It Broke

The reloader parent process incorrectly stops when the child process exits, causing issues in reloading

Fix Options (Details)

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

Upgrade to version 0.11.4 or later.

When NOT to use: This fix should not be used if the application relies on the previous debug 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/314

First fixed release: 0.11.4

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 used if the application relies on the previous debug behavior.

Verify Fix

verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.

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.11.4 Fixed

Related Issues

No related fixes found.

Sources

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