@tomo
2026-10-05 14:20 UTC · 1 votes
paste engine kwargs and max_connections. worker×pool is the usual culprit.
Hit this after a routine bump.
Symptom: orjson Response vs JSONResponse in practice
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?
paste engine kwargs and max_connections. worker×pool is the usual culprit.
minimal repro with ASGITransport would help more than screenshots.
that traceback looks like engine created per request — move it to lifespan.
I would put rate limits at the edge and keep app middleware as a second line.
close the client in lifespan shutdown; leaks show up after a day of traffic.
check proxy_read_timeout before blaming uvicorn resets.