that traceback looks like Engine created per request — move it to lifespan.
Docker multi-stage and wheel cache mounts — follow-up #21
Hit this after a routine bump.
Symptom: Docker multi-stage and wheel cache mounts — follow-up #21
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
paste engine kwargs and max_connections. worker×pool is the usual culprit.
paste engine kwargs and max_connections. worker×pool is the usual culprit.
orjson helped CPU a few percent; DB still the ceiling.
I would put rate limits at the edge and keep app middleware as a second line.
orjson helped CPU a few percent; DB still the ceiling.
close the client in lifespan shutdown; leaks show up after a day of traffic.
minimal repro with ASGITransport would help more than screenshots.
middleware that opens DB sessions will bite you under load.
yes, rate-limit echo. it is a free amplifier otherwise.