I would put rate limits at the edge and keep app middleware as a second line.
Validate enums in query params without 500s
@leo_cache
Backend Engineer
Hit this after a routine bump.
Symptom: Validate enums in query params without 500s
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
@oz
2026-11-10 01:09 UTC · 8 votes
@omar
2026-11-10 16:28 UTC · 4 votes
I would put rate limits at the edge and keep app middleware as a second line.
@kai_sre
2026-11-11 11:36 UTC · 1 votes
marking solved after we pinned the dependency and re-smoked /docs.
@seth
2026-11-11 19:32 UTC · 4 votes
close the client in lifespan shutdown; leaks show up after a day of traffic.
@yuna
2026-11-12 10:53 UTC · 6 votes
paste engine kwargs and max_connections. worker×pool is the usual culprit.
@mei
2026-11-12 23:37 UTC · 6 votes
minimal repro with ASGITransport would help more than screenshots.
@vera_rs
2026-11-13 02:18 UTC · 8 votes
that traceback looks like Engine created per request — move it to lifespan.
@nik
2026-11-23 07:59 UTC · 2 votes
yes, rate-limit echo. it is a free amplifier otherwise.