Jump to solution
Verify

The Fix

Upgrade to version 0.11.4 or later.

Based on closed Kludex/uvicorn issue #426 · 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%.

Jump to Verify Open PR/Commit
@@ -25,6 +25,7 @@ def __init__(self, *args, **kwargs): "timeout_notify": self.timeout, "callback_notify": self.callback_notify, + "limit_max_requests": self.max_requests, }
repro.py
import logging import os from aiohttp import web logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') logging.info(f"WORKER STARTING with pid {os.getpid()}") routes = web.RouteTableDef() @routes.get('/') async def healthcheck(request): return web.json_response(dict(status="Ok")) app = web.Application() app.add_routes(routes)
verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
fix.md
Option A — Upgrade to fixed release\nUpgrade to version 0.11.4 or later.\nWhen NOT to use: This fix is not applicable if using a different server configuration that does not involve Gunicorn.\n\n

Why This Fix Works in Production

  • Trigger: This allows you to increase or decrease the number of worker processes on the fly, restart worker processes gracefully, or perform server upgrades without…
  • Mechanism: Uvicorn was not handling the Gunicorn max_requests configuration correctly, preventing worker restarts
  • Why the fix works: Fixes the handling of the Gunicorn max_requests configuration in Uvicorn, resolving the issue where workers were not restarting as expected. (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

  • Uvicorn was not handling the Gunicorn max_requests configuration correctly, preventing worker restarts
  • Production symptom (often without a traceback): This allows you to increase or decrease the number of worker processes on the fly, restart worker processes gracefully, or perform server upgrades without downtime.

Proof / Evidence

  • GitHub issue: #426
  • Fix PR: https://github.com/kludex/uvicorn/pull/436
  • 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.63

Discussion

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

“## To reproduce Content of aiohttp_main.py: Content of fastapi_main.py Here is the output from each experiment showing that with the aiohttp.GunicornWebWorker, the worker is getting…”
@jsjeannotte · 2019-09-23 · source
“Yes, I forgot to mention that I tried under gunicorn and still no luck: Then I send multiple requests but still, it's not behaving like…”
@jsjeannotte · 2019-09-23 · source
“Thanks. I can reproduce this problem in my local environment. It seems uvicorn not handle gunicorn max_requests config. https://github.com/benoitc/gunicorn/blob/f35ae584b41b4808a23a689d3168e87328d5ebb1/gunicorn/workers/base.py#L55-L59”
@Hanaasagi · 2019-09-24 · source
“Tested the fix and it works. Thanks for the quick turnaround! When is the next release scheduled?”
@jsjeannotte · 2019-09-25 · source

Failure Signature (Search String)

  • This allows you to increase or decrease the number of worker processes on the fly, restart worker processes gracefully, or perform server upgrades without downtime.
Copy-friendly signature
signature.txt
Failure Signature ----------------- This allows you to increase or decrease the number of worker processes on the fly, restart worker processes gracefully, or perform server upgrades without downtime.

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- This allows you to increase or decrease the number of worker processes on the fly, restart worker processes gracefully, or perform server upgrades without downtime.

Minimal Reproduction

repro.py
import logging import os from aiohttp import web logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') logging.info(f"WORKER STARTING with pid {os.getpid()}") routes = web.RouteTableDef() @routes.get('/') async def healthcheck(request): return web.json_response(dict(status="Ok")) app = web.Application() app.add_routes(routes)

What Broke

Workers did not restart as expected, leading to potential request handling issues.

Why It Broke

Uvicorn was not handling the Gunicorn max_requests configuration correctly, preventing worker restarts

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 applicable if using a different server configuration that does not involve Gunicorn.

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

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 applicable if using a different server configuration that does not involve Gunicorn.

Verify Fix

verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.

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