Jump to solution
Details

The Fix

Upgrade to version 0.11.4 or later.

Based on closed Kludex/uvicorn issue #360 · PR/commit linked

Production note: This tends to surface only under concurrency. Reproduce with load tests and watch for lock contention/cancellation paths.

Open PR/Commit
@@ -298,6 +298,7 @@ def __init__(self, config): self.should_exit = False self.force_exit = False + self.last_notified = 0 def run(self, sockets=None, shutdown_servers=True):
fix.md
Option A — Upgrade to fixed release\nUpgrade to version 0.11.4 or later.\nWhen NOT to use: This fix is not safe if the timing of notifications is critical for application behavior.\n\n

Why This Fix Works in Production

  • Trigger: Took a bit of tracking down. Obviously it can be avoided with executors but its a pretty bad failure mode.
  • Mechanism: Uses wall clock time to determine the gap between notify calls, ensuring timely notifications to gunicorn.
  • Why the fix works: Uses wall clock time to determine the gap between notify calls, ensuring timely notifications to gunicorn. (first fixed release: 0.11.4).
Production impact:
  • If left unfixed, failures can be intermittent under concurrency (hard to reproduce; shows up as sporadic 5xx/timeouts).

Why This Breaks in Prod

  • Production symptom (often without a traceback): Took a bit of tracking down. Obviously it can be avoided with executors but its a pretty bad failure mode.

Proof / Evidence

  • GitHub issue: #360
  • Fix PR: https://github.com/kludex/uvicorn/pull/361
  • First fixed release: 0.11.4
  • 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.73

Discussion

High-signal excerpts from the issue thread (symptoms, repros, edge-cases).

“Sounds reasonable. Have you observed this behavior in the wild?”
@lovelydinosaur · 2019-05-10 · source
“Unfortunately yes! Call to a bit of cpu intensive but still relatively quick code (~1-2secs). Gradually the ticks get behind. Took a bit of tracking…”
@rjwittams · 2019-05-10 · source
“Gotcha. Pull requests towards resolving this obvs. welcome, but it'll be on my list either way.”
@lovelydinosaur · 2019-05-10 · source
“I have a fix, will make a PR later or tomorrow. Just 5 lines or so”
@rjwittams · 2019-05-10 · source

Failure Signature (Search String)

  • Took a bit of tracking down. Obviously it can be avoided with executors but its a pretty bad failure mode.
Copy-friendly signature
signature.txt
Failure Signature ----------------- Took a bit of tracking down. Obviously it can be avoided with executors but its a pretty bad failure mode.

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- Took a bit of tracking down. Obviously it can be avoided with executors but its a pretty bad failure mode.

What Broke

The process gets killed due to delayed notifications to gunicorn.

Fix Options (Details)

Option A — Upgrade to fixed release Safe default (recommended)

Upgrade to version 0.11.4 or later.

When NOT to use: This fix is not safe if the timing of notifications is critical for application behavior.

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/361

First fixed release: 0.11.4

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 safe if the timing of notifications is critical for application behavior.

Did This Fix Work in Your Case?

Quick signal helps us prioritize which fixes to verify and improve.

Prevention

  • Add a stress test that runs high-concurrency workloads and fails on thread dumps / blocked locks.
  • Enable watchdog dumps in prod (faulthandler, thread dump endpoint) to capture deadlocks quickly.

Version Compatibility Table

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