Jump to solution
Verify

The Fix

Upgrade to version 0.11.5 or later.

Based on closed Kludex/uvicorn issue #656 · 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
@@ -1,8 +1,15 @@ # Change Log +## 0.11.5 + +* Revert "Watch all files, not just .py" due to unexpected side effects.
repro.py
WARNING: Detected file change in 'app/main.py'. Reloading... INFO: Shutting down INFO: Waiting for application shutdown. INFO: Application shutdown complete. INFO: Finished server process [87024] INFO: Started server process [87080] INFO: Waiting for application startup. INFO: Application startup complete. WARNING: Detected file change in 'app/__pycache__/main.cpython-37.pyc'. Reloading... INFO: Shutting down INFO: Waiting for application shutdown. INFO: Application shutdown complete. INFO: Finished server process [87080] INFO: Started server process [87093] INFO: Waiting for application startup. INFO: Application startup complete.
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.5 or later.\nWhen NOT to use: This fix should not be applied if the intended behavior is to watch all file changes.\n\n

Why This Fix Works in Production

  • Trigger: WARNING: Detected file change in 'app/main.py'. Reloading...
  • Mechanism: Version 0.11.5 reverts changes that caused unexpected side effects related to file watching behavior, addressing issue #656.
  • Why the fix works: Version 0.11.5 reverts changes that caused unexpected side effects related to file watching behavior, addressing issue #656. (first fixed release: 0.11.5).
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

  • Production symptom (often without a traceback): WARNING: Detected file change in 'app/main.py'. Reloading...

Proof / Evidence

  • GitHub issue: #656
  • Fix PR: https://github.com/kludex/uvicorn/pull/660
  • First fixed release: 0.11.5
  • 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.47

Discussion

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

“Can you please paste the output just above what you pasted just to see what reloader it uses?”
@euri10 · 2020-04-28 · source
“ok it's on statreloader, will send a PR asap”
@euri10 · 2020-04-28 · source
“Thanks for reporting this! 0.11.5 is now published... https://github.com/encode/uvicorn/runs/629310851?check_suite_focus=true”
@lovelydinosaur · 2020-04-29 · source

Failure Signature (Search String)

  • WARNING: Detected file change in 'app/main.py'. Reloading...
  • WARNING: Detected file change in 'app/__pycache__/main.cpython-37.pyc'. Reloading...
Copy-friendly signature
signature.txt
Failure Signature ----------------- WARNING: Detected file change in 'app/main.py'. Reloading... WARNING: Detected file change in 'app/__pycache__/main.cpython-37.pyc'. Reloading...

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- WARNING: Detected file change in 'app/main.py'. Reloading... WARNING: Detected file change in 'app/__pycache__/main.cpython-37.pyc'. Reloading...

Minimal Reproduction

repro.py
WARNING: Detected file change in 'app/main.py'. Reloading... INFO: Shutting down INFO: Waiting for application shutdown. INFO: Application shutdown complete. INFO: Finished server process [87024] INFO: Started server process [87080] INFO: Waiting for application startup. INFO: Application startup complete. WARNING: Detected file change in 'app/__pycache__/main.cpython-37.pyc'. Reloading... INFO: Shutting down INFO: Waiting for application shutdown. INFO: Application shutdown complete. INFO: Finished server process [87080] INFO: Started server process [87093] INFO: Waiting for application startup. INFO: Application startup complete.

Fix Options (Details)

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

Upgrade to version 0.11.5 or later.

When NOT to use: This fix should not be applied if the intended behavior is to watch all file changes.

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/660

First fixed release: 0.11.5

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 intended behavior is to watch all file changes.

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

Related Issues

No related fixes found.

Sources

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