The Fix
Upgrade to version 0.11.4 or later.
Based on closed Kludex/uvicorn issue #582 · 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%.
@@ -178,7 +178,7 @@ def __init__(
if reload_dirs is None:
- self.reload_dirs = sys.path
+ self.reload_dirs = [os.getcwd()]
else:
Option A — Upgrade to fixed release\nUpgrade to version 0.11.4 or later.\nWhen NOT to use: Do not use if it changes public behavior or if the failure cannot be reproduced.\n\n
Why This Fix Works in Production
- Trigger: reloader does not watching sys.path
- Mechanism: --reload-dir now defaults to CWD, instead of sys.path to reduce memory usage.
- Why the fix works: --reload-dir now defaults to CWD, instead of sys.path to reduce memory usage. (first fixed release: 0.11.4).
- 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): reloader does not watching sys.path
Proof / Evidence
- GitHub issue: #582
- Fix PR: https://github.com/encode/uvicorn/pull/479
- 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.62
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“This is a documentation oversight — https://github.com/encode/uvicorn/pull/479 changed the behavior to watch os.get_cwd() to reduce high memory usage (https://github.com/encode/uvicorn/pull/452).”
Failure Signature (Search String)
- reloader does not watching sys.path
- `--reload-dir <path>` - Specify which directories to watch for python file changes. May be used multiple times. If unused, then by default all directories in `sys.path` will be
Copy-friendly signature
Failure Signature
-----------------
reloader does not watching sys.path
`--reload-dir <path>` - Specify which directories to watch for python file changes. May be used multiple times. If unused, then by default all directories in `sys.path` will be watched.
Error Message
Signature-only (no traceback captured)
Error Message
-------------
reloader does not watching sys.path
`--reload-dir <path>` - Specify which directories to watch for python file changes. May be used multiple times. If unused, then by default all directories in `sys.path` will be watched.
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
Upgrade to version 0.11.4 or later.
Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.
Fix reference: https://github.com/encode/uvicorn/pull/479
First fixed release: 0.11.4
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- Do not use if it changes public behavior or if the failure cannot be reproduced.
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.4 | Fixed |
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.