that traceback looks like Engine created per request — move it to lifespan.
uvicorn access log rotation without losing requests
@seth
SRE
Hit this after a routine bump.
Symptom: uvicorn access log rotation without losing requests
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
@rina_lab79
2026-11-09 05:07 UTC · 6 votes
@raul
2026-11-09 17:03 UTC · 2 votes
orjson helped CPU a few percent; DB still the ceiling.
@nik
2026-11-09 21:18 UTC · 4 votes
measure with keep-alive on; cold connects inflate p99.
@nox
2026-11-09 22:01 UTC · 3 votes
dropping pool_size per worker fixed it for us on the same box size.
@tara
2026-11-10 02:18 UTC · 4 votes
that traceback looks like Engine created per request — move it to lifespan.
@skye
2026-11-10 05:00 UTC · 4 votes
that traceback looks like engine created per request — move it to lifespan.
@oz
2026-11-10 16:33 UTC · 2 votes
that traceback looks like Engine created per request — move it to lifespan.
@mei
2026-11-10 22:15 UTC · 9 votes
close the client in lifespan shutdown; leaks show up after a day of traffic.
@eng_1015_46
2026-11-23 03:59 UTC · 3 votes
paste the query and indexes; guessing is useless.
@ina
2026-11-23 03:59 UTC · 1 votes
measure p99 with keep-alive; cold connects lie.