The Fix
Upgrade to version 0.12.0 or later.
Based on closed Kludex/uvicorn issue #702 · 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%.
@@ -33,6 +33,26 @@ Install using `pip`:
```
+This will install uvicorn with minimal (pure Python) dependencies.
+
+```shell
Option A — Upgrade to fixed release\nUpgrade to version 0.12.0 or later.\nWhen NOT to use: This fix is not suitable if uvloop is required for performance optimizations.\n\n
Why This Fix Works in Production
- Trigger: Building uvicorn in Docker takes excessive time due to uvloop installation.
- Mechanism: Uvicorn automatically installs uvloop as a dependency, which can slow down builds
- Why the fix works: Allows optional package installs for uvicorn, enabling users to install it without the uvloop dependency. (first fixed release: 0.12.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
- Uvicorn automatically installs uvloop as a dependency, which can slow down builds
- Production symptom (often without a traceback): Building uvicorn in Docker takes excessive time due to uvloop installation.
Proof / Evidence
- GitHub issue: #702
- Fix PR: https://github.com/encode/uvicorn/pull/666
- First fixed release: 0.12.0
- 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.83
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“Most of the value of uvicorn in my own projects is that _it is based on uvloop_. If I didn't want something built on uvloop,…”
“that's what https://github.com/encode/uvicorn/pull/666 intends to do @mojimi so once a reviewer will have time I think you'll get what you want”
Failure Signature (Search String)
- Building uvicorn in Docker takes excessive time due to uvloop installation.
Copy-friendly signature
Failure Signature
-----------------
Building uvicorn in Docker takes excessive time due to uvloop installation.
Error Message
Signature-only (no traceback captured)
Error Message
-------------
Building uvicorn in Docker takes excessive time due to uvloop installation.
What Broke
Building uvicorn in Docker takes excessive time due to uvloop installation.
Why It Broke
Uvicorn automatically installs uvloop as a dependency, which can slow down builds
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
Upgrade to version 0.12.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/encode/uvicorn/pull/666
First fixed release: 0.12.0
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- This fix is not suitable if uvloop is required for performance optimizations.
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.12.0 | Fixed |
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.