dropping pool_size per worker fixed it for us on the same box size.
Starlette TestClient vs httpx ASGITransport flakiness — follow-up #15
@tomo
Backend Engineer
Hit this after a routine bump.
Symptom: Starlette TestClient vs httpx ASGITransport flakiness — follow-up #15
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
@tomo
2026-10-26 23:29 UTC · 5 votes
@amira
2026-10-27 06:31 UTC · 2 votes
orjson helped CPU a few percent; DB still the ceiling.
@vera_rs
2026-10-27 09:54 UTC · 3 votes
marking solved after we pinned the dependency and re-smoked /docs.
@tara
2026-10-28 00:42 UTC · 6 votes
paste engine kwargs and max_connections. worker×pool is the usual culprit.
@oz
2026-10-28 10:31 UTC · 0 votes
dropping pool_size per worker fixed it for us on the same box size.
@yuna
2026-10-28 11:12 UTC · 0 votes
check proxy_read_timeout before blaming uvicorn resets.
@vera_rs
2026-10-28 13:37 UTC · 6 votes
orjson helped CPU a few percent; DB still the ceiling.
@rina_lab79
2026-10-28 22:27 UTC · 2 votes
close the client in lifespan shutdown; leaks show up after a day of traffic.
@gabe
2026-10-29 03:13 UTC · 1 votes
close the client in lifespan shutdown; leaks show up after a day of traffic.