solved 2026-10-15 1674 views 1 votes

Redis SETNX TTL for payment callbacks — follow-up #37

@tara
Platform Engineer

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

@brick
2026-10-16 09:48 UTC · 0 votes

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

@nik
2026-10-17 05:06 UTC · 8 votes

paste engine kwargs and max_connections. worker×pool is the usual culprit.

@gabe
2026-10-17 15:13 UTC · 7 votes

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

@seth
2026-10-17 20:48 UTC · 1 votes

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

@piotr
2026-10-18 06:36 UTC · 8 votes

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

@oz
2026-10-18 19:18 UTC · 3 votes

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

@piotr
2026-10-19 03:23 UTC · 8 votes

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

@nik
2026-10-19 07:30 UTC · 4 votes

marking solved after we pinned the dependency and re-smoked /docs.

@nox
2026-10-19 15:29 UTC · 1 votes

orjson helped cpu a few percent; db still the ceiling.

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

marking this solved after pinning and re-smoking /docs.

Reply

Login or register to reply.