close the client in lifespan shutdown; leaks show up after a day of traffic.
EXPLAIN ANALYZE for a paginated list that got slow
@skye
Junior Python Dev
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?
9 replies
@ina
2026-11-15 10:48 UTC · 1 votes
@kai_sre
2026-11-15 19:15 UTC · 7 votes
I would put rate limits at the edge and keep app middleware as a second line.
@nox
2026-11-16 12:41 UTC · 2 votes
i would put rate limits at the edge and keep app middleware as a second line.
@leda
2026-11-16 16:17 UTC · 1 votes
marking solved after we pinned the dependency and re-smoked /docs.
@omar
2026-11-17 06:00 UTC · 5 votes
that traceback looks like Engine created per request — move it to lifespan.
@cleo_dev29
2026-11-17 15:51 UTC · 10 votes
marking solved after we pinned the dependency and re-smoked /docs.
@piotr
2026-11-18 10:24 UTC · 6 votes
orjson helped CPU a few percent; DB still the ceiling.
@kai_sre
2026-11-18 22:36 UTC · 3 votes
that traceback looks like Engine created per request — move it to lifespan.
@omar
2026-11-19 15:25 UTC · 6 votes
minimal repro with ASGITransport would help more than screenshots.