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.
@@ -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):
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).
- 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?”
“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…”
“Gotcha. Pull requests towards resolving this obvs. welcome, but it'll be on my list either way.”
“I have a fix, will make a PR later or tomorrow. Just 5 lines or so”
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
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 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.
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.
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
| 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.