The Fix
Upgrade to version 0.15.0 or later.
Based on closed Kludex/uvicorn issue #966 · 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%.
@@ -37,6 +37,13 @@ Options:
--reload-dir PATH Set reload directories explicitly, instead
of using the current working directory.
+ --reload-include TEXT Set glob patterns to include while watching
+ for files. Includes '*.py' by default, which
+ can be overridden in reload-excludes.
Option A — Upgrade to fixed release\nUpgrade to version 0.15.0 or later.\nWhen NOT to use: This fix should not be used if specific hidden directories need to trigger reloads.\n\n
Why This Fix Works in Production
- Trigger: Ignore changes to any top-level directory starting with a "."
- Mechanism: Adds options to configure reload behavior in Uvicorn, allowing users to specify which files and directories to include or exclude from triggering reloads.
- Why the fix works: Adds options to configure reload behavior in Uvicorn, allowing users to specify which files and directories to include or exclude from triggering reloads. (first fixed release: 0.15.0).
- 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): Ignore changes to any top-level directory starting with a "."
Proof / Evidence
- GitHub issue: #966
- Fix PR: https://github.com/kludex/uvicorn/pull/820
- First fixed release: 0.15.0
- 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.65
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“there is an old PR that aims at making this more configurable, will try to find it when time permits”
“Making it more configurable would help, but I think ignoring directories starting with a . would be a sensible default to have? I personally can't…”
“watchgod by default ignores those directories ignored_dirs = {'.git', '__pycache__', 'site-packages', '.idea', 'node_modules'} I'd rather have a switch to exclude globs like in https://github.com/encode/uvicorn/pull/820 than…”
Failure Signature (Search String)
- Ignore changes to any top-level directory starting with a "."
- WARNING: WatchGodReload detected file change in '['PROJECT_PATH/.media/3fa85f64-5717-4562-b3fc-2c963f66afa6/cropped.png']'. Reloading...
Copy-friendly signature
Failure Signature
-----------------
Ignore changes to any top-level directory starting with a "."
WARNING: WatchGodReload detected file change in '['PROJECT_PATH/.media/3fa85f64-5717-4562-b3fc-2c963f66afa6/cropped.png']'. Reloading...
Error Message
Signature-only (no traceback captured)
Error Message
-------------
Ignore changes to any top-level directory starting with a "."
WARNING: WatchGodReload detected file change in '['PROJECT_PATH/.media/3fa85f64-5717-4562-b3fc-2c963f66afa6/cropped.png']'. Reloading...
What Broke
File uploads triggered unnecessary reloads in the Uvicorn server during development.
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
Upgrade to version 0.15.0 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/820
First fixed release: 0.15.0
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- This fix should not be used if specific hidden directories need to trigger reloads.
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.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.