@tara
2026-10-11 13:12 UTC · 4 votes
orjson helped CPU a few percent; DB still the ceiling.
Hit this after a routine bump.
Symptom: nginx proxy_buffering off for SSE — side effects?
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?
orjson helped CPU a few percent; DB still the ceiling.
paste engine kwargs and max_connections. worker×pool is the usual culprit.
measure with keep-alive on; cold connects inflate p99.
marking solved after we pinned the dependency and re-smoked /docs.
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.
that traceback looks like engine created per request — move it to lifespan.