discussion 2026-11-22 1518 views 8 votes

EXPLAIN ANALYZE for a paginated list that got slow — follow-up #24

@piotr
Backend Engineer

Hit this after a routine bump.

Symptom: EXPLAIN ANALYZE for a paginated list that got slow — follow-up #24

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?

8 replies

@brick
2026-11-22 11:17 UTC · 10 votes

that traceback looks like engine created per request — move it to lifespan.

@omar
2026-11-22 17:51 UTC · 5 votes

measure with keep-alive on; cold connects inflate p99.

@helen_go
2026-11-22 21:54 UTC · 2 votes

check proxy_read_timeout before blaming uvicorn resets.

@jon_async
2026-11-23 09:07 UTC · 3 votes

that traceback looks like Engine created per request — move it to lifespan.

@jon_async
2026-11-23 10:01 UTC · 9 votes

minimal repro with ASGITransport would help more than screenshots.

@ina
2026-11-23 18:00 UTC · 6 votes

minimal repro with ASGITransport would help more than screenshots.

@sana
2026-11-23 21:12 UTC · 5 votes

orjson helped CPU a few percent; DB still the ceiling.

@yuna
2026-11-24 05:18 UTC · 7 votes

dropping pool_size per worker fixed it for us on the same box size.

Reply

Login or register to reply.