Jump to solution
Details

The Fix

Upgrade to version 0.11.4 or later.

Based on closed Kludex/uvicorn issue #389 · 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
@@ -12,7 +12,7 @@ async def app(scope, receive, send): await send({"type": "http.response.body", "body": b"", "more_body": False}) - caplog.set_level(logging.DEBUG, logger="uvicorn") + caplog.set_level(logging.DEBUG, logger="uvicorn.error") app = MessageLoggerMiddleware(app)
fix.md
Option A — Upgrade to fixed release\nUpgrade to version 0.11.4 or later.\nWhen NOT to use: This fix is not suitable if you require a single logger for both access and error logs.\n\n

Why This Fix Works in Production

  • Trigger: Gunicorn access logging is broken
  • Mechanism: The access logs were incorrectly routed to the error logger instead of the access logger
  • Why the fix works: Adds separately configured loggers for 'uvicorn.error' and 'uvicorn.access', which write to stderr and stdout respectively, fixing the access logging issue with Gunicorn. (first fixed release: 0.11.4).
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

  • The access logs were incorrectly routed to the error logger instead of the access logger
  • Production symptom (often without a traceback): Gunicorn access logging is broken

Proof / Evidence

  • GitHub issue: #389
  • Fix PR: https://github.com/encode/uvicorn/pull/462
  • 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.72

Discussion

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

“hello, is there an ETA for this fix? Also will the gunicorn access log format setting be honored?”
@kireet · 2019-08-26 · source
“Okay, we still need to deal with the access log format, but we've got properly seperated access and error logs in master now.”
@lovelydinosaur · 2019-10-29 · source
“I assume to properly address this, uvicorn would need to be using two independently configured logger instances in the first place, in the same way…”
@lovelydinosaur · 2019-07-17 · source
“Hi @tomchristie, yes, that is the same approach I was thinking and allows uvicorn to match gunicorn for easier compatibility.”
@nwalsh1995 · 2019-07-17 · source

Failure Signature (Search String)

  • Gunicorn access logging is broken
  • So instead of `self.logger.info()`, we'd use `self.access_logs.info()` and `self.error_logs.info()`.
Copy-friendly signature
signature.txt
Failure Signature ----------------- Gunicorn access logging is broken So instead of `self.logger.info()`, we'd use `self.access_logs.info()` and `self.error_logs.info()`.

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- Gunicorn access logging is broken So instead of `self.logger.info()`, we'd use `self.access_logs.info()` and `self.error_logs.info()`.

What Broke

Access logs were missing from the specified access log file, leading to incomplete logging.

Why It Broke

The access logs were incorrectly routed to the error logger instead of the access logger

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 suitable if you require a single logger for both access and error logs.

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

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 suitable if you require a single logger for both access and error logs.

Did This Fix Work in Your Case?

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

Prevention

  • Add a TLS smoke test that performs a real handshake in CI (include CA bundle validation and hostname checks).
  • Alert on handshake failures by error string and endpoint to catch cert/CA changes 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.