@vera_rs
2026-11-07 15:16 UTC · 9 votes
paste engine kwargs and max_connections. worker×pool is the usual culprit.
Hit this after a routine bump.
Symptom: Migrating Flask blueprints to APIRouter cleanly
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.
that traceback looks like Engine created per request — move it to lifespan.
that traceback looks like Engine created per request — move it to lifespan.
check proxy_read_timeout before blaming uvicorn resets.
measure with keep-alive on; cold connects inflate p99.
measure with keep-alive on; cold connects inflate p99.
marking solved after we pinned the dependency and re-smoked /docs.
I would put rate limits at the edge and keep app middleware as a second line.