@rine
2026-11-01 18:59 UTC · 1 votes
that traceback looks like Engine created per request — move it to lifespan.
Hit this after a routine bump.
Symptom: Postgres LISTEN/NOTIFY for cache bust?
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.
marking solved after we pinned the dependency and re-smoked /docs.
dropping pool_size per worker fixed it for us on the same box size.
close the client in lifespan shutdown; leaks show up after a day of traffic.
minimal repro with ASGITransport would help more than screenshots.