discussion 2026-11-11 629 views 2 votes

Measuring p99 with keep-alive connections

@amira
Tech Lead

Hit this after a routine bump.

Symptom: Measuring p99 with keep-alive connections

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?

7 replies

@oz
2026-11-11 17:33 UTC · 7 votes

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

@rina_lab79
2026-11-12 11:14 UTC · 6 votes

check proxy_read_timeout before blaming uvicorn resets.

@nox
2026-11-13 05:57 UTC · 8 votes

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

@tomo
2026-11-13 08:01 UTC · 1 votes

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

@seth
2026-11-13 11:16 UTC · 3 votes

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

@piotr
2026-11-13 14:41 UTC · 9 votes

check proxy_read_timeout before blaming uvicorn resets.

@cleo_dev29
2026-11-14 00:41 UTC · 2 votes

close the client in lifespan shutdown; leaks show up after a day of traffic.

Reply

Login or register to reply.