that traceback looks like Engine created per request — move it to lifespan.
Structured logging fields that survive kubectl — follow-up #35
Hit this after a routine bump.
Symptom: Structured logging fields that survive kubectl — follow-up #35
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
marking solved after we pinned the dependency and re-smoked /docs.
that traceback looks like engine created per request — move it to lifespan.
minimal repro with ASGITransport would help more than screenshots.
dropping pool_size per worker fixed it for us on the same box size.
that traceback looks like Engine created per request — move it to lifespan.
measure with keep-alive on; cold connects inflate p99.
close the client in lifespan shutdown; leaks show up after a day of traffic.
marking solved after we pinned the dependency and re-smoked /docs.
middleware that opens DB sessions will bite you under load.