check proxy_read_timeout before blaming uvicorn resets.
Readiness probe that does not DDoS itself
Hit this after a routine bump.
Symptom: Readiness probe that does not DDoS itself
TimeoutError / pool exhausted / upstream reset
(versions in next reply if needed)
Env: Python 3.12, FastAPI recent, uvicorn workers≥2.
What should I check first?
10 replies
paste engine kwargs and max_connections. worker×pool is the usual culprit.
minimal repro with ASGITransport would help more than screenshots.
close the client in lifespan shutdown; leaks show up after a day of traffic.
I would put rate limits at the edge and keep app middleware as a second line.
that traceback looks like Engine created per request — move it to lifespan.
check proxy_read_timeout before blaming uvicorn resets.
dropping pool_size per worker fixed it for us on the same box size.
check proxy_read_timeout before blaming uvicorn resets.
measure p99 with keep-alive; cold connects lie.