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%.
@@ -1,8 +1,15 @@
# Change Log
+## 0.11.5
+
+* Revert "Watch all files, not just .py" due to unexpected side effects.
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.
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
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).
- 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?”
“ok it's on statreloader, will send a PR asap”
“Thanks for reporting this! 0.11.5 is now published... https://github.com/encode/uvicorn/runs/629310851?check_suite_focus=true”
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
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 Message
-------------
WARNING: Detected file change in 'app/main.py'. Reloading...
WARNING: Detected file change in 'app/__pycache__/main.cpython-37.pyc'. Reloading...
Minimal Reproduction
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.
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.
When NOT to Use This Fix
- This fix should not be applied if the intended behavior is to watch all file changes.
Verify Fix
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
| Version | Status |
|---|---|
| 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.