@mira_py
2026-10-10 07:46 UTC · 9 votes
dropping pool_size per worker fixed it for us on the same box size.
Hit this after a routine bump.
Symptom: Postgres RLS vs app-level tenant filters — follow-up #26
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?
dropping pool_size per worker fixed it for us on the same box size.
measure with keep-alive on; cold connects inflate p99.
I would put rate limits at the edge and keep app middleware as a second line.
paste engine kwargs and max_connections. worker×pool is the usual culprit.
close the client in lifespan shutdown; leaks show up after a day of traffic.
align client timeout below proxy timeout or you get retry storms.
marking this solved after pinning and re-smoking /docs.