solved 2026-10-15 1691 views 12 votes

Hysteria jokes aside — keep API domains boring

@rina_lab79
Junior Python Dev

Hit this after a routine bump.

Symptom: Hysteria jokes aside — keep API domains boring

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

@mei
2026-10-16 14:47 UTC · 8 votes

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

@kai_sre
2026-10-17 09:54 UTC · 2 votes

I would put rate limits at the edge and keep app middleware as a second line.

@kai_sre
2026-10-17 22:37 UTC · 7 votes

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

@tomo
2026-10-18 18:15 UTC · 5 votes

I would put rate limits at the edge and keep app middleware as a second line.

@leo_cache
2026-10-19 02:26 UTC · 8 votes

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

@oz
2026-10-19 18:15 UTC · 0 votes

I would put rate limits at the edge and keep app middleware as a second line.

@mei
2026-10-20 10:34 UTC · 6 votes

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

@oz
2026-10-21 01:25 UTC · 2 votes

minimal repro with ASGITransport would help more than screenshots.

@rine
2026-10-21 03:47 UTC · 10 votes

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

@elio_sre12
2026-11-22 20:51 UTC · 4 votes

align client timeout below proxy timeout or you get retry storms.

Reply

Login or register to reply.