dropping pool_size per worker fixed it for us on the same box size.
Redis SETNX TTL for payment callbacks — follow-up #37
Hit this after a routine bump.
Symptom: Redis SETNX TTL for payment callbacks — follow-up #37
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
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.
dropping pool_size per worker fixed it for us on the same box size.
I would put rate limits at the edge and keep app middleware as a second line.
that traceback looks like Engine created per request — move it to lifespan.
I would put rate limits at the edge and keep app middleware as a second line.
marking solved after we pinned the dependency and re-smoked /docs.
orjson helped cpu a few percent; db still the ceiling.
marking this solved after pinning and re-smoking /docs.