@omar
2026-11-10 18:12 UTC · 1 votes
I would put rate limits at the edge and keep app middleware as a second line.
Hit this after a routine bump.
Symptom: WebSocket auth cookie vs header
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?
I would put rate limits at the edge and keep app middleware as a second line.
orjson helped CPU a few percent; DB still the ceiling.
paste engine kwargs and max_connections. worker×pool is the usual culprit.
check your workers first; each one duplicates logging handlers.