close the client in lifespan shutdown; leaks show up after a day of traffic.
EXPLAIN ANALYZE for a paginated list that got slow
Hit this after a routine bump.
Symptom: EXPLAIN ANALYZE for a paginated list that got slow
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
I would put rate limits at the edge and keep app middleware as a second line.
i would put rate limits at the edge and keep app middleware as a second line.
marking solved after we pinned the dependency and re-smoked /docs.
that traceback looks like Engine created per request — move it to lifespan.
marking solved after we pinned the dependency and re-smoked /docs.
orjson helped CPU a few percent; DB still the ceiling.
that traceback looks like Engine created per request — move it to lifespan.
minimal repro with ASGITransport would help more than screenshots.
measure p99 with keep-alive; cold connects lie.