@helen_go
2026-09-28 15:29 UTC · 9 votes
that traceback looks like Engine created per request — move it to lifespan.
Hit this after a routine bump.
Symptom: TLS termination: nginx vs cloud LB for ASGI — follow-up #23
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?
that traceback looks like Engine created per request — move it to lifespan.
measure with keep-alive on; cold connects inflate p99.
measure with keep-alive on; cold connects inflate p99.
dropping pool_size per worker fixed it for us on the same box size.
we fixed the same class of bug by moving Engine creation into lifespan.