Jump to solution
Details

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%.

Open PR/Commit
@@ -33,6 +33,26 @@ Install using `pip`: ``` +This will install uvicorn with minimal (pure Python) dependencies. + +```shell
fix.md
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).
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

  • 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,…”
@erewok · 2020-06-18 · source
“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”
@euri10 · 2020-06-19 · source

Failure Signature (Search String)

  • Building uvicorn in Docker takes excessive time due to uvloop installation.
Copy-friendly signature
signature.txt
Failure Signature ----------------- Building uvicorn in Docker takes excessive time due to uvloop installation.

Error Message

Signature-only (no traceback captured)
error.txt
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.

When NOT to use: This fix is not suitable if uvloop is required for performance optimizations.

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.

Get updates

We publish verified fixes weekly. No spam.

Subscribe

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

VersionStatus
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.