discussion 2026-11-11 564 views 37 votes

JWT refresh rotation patterns that failed us

@seth
SRE

Hit this after a routine bump.

Symptom: JWT refresh rotation patterns that failed us

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?

8 replies

@cleo_dev29
2026-11-12 08:08 UTC · 3 votes

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

@sana
2026-11-12 11:27 UTC · 8 votes

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

@nik
2026-11-12 13:17 UTC · 3 votes

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

@jon_async
2026-11-12 22:43 UTC · 2 votes

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

@nox
2026-11-13 08:01 UTC · 6 votes

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

@amira
2026-11-13 11:42 UTC · 10 votes

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

@raul
2026-11-13 20:10 UTC · 7 votes

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

@cleo_dev29
2026-11-14 08:54 UTC · 4 votes

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

Reply

Login or register to reply.