@piotr
2026-10-06 09:31 UTC · 10 votes
paste engine kwargs and max_connections. worker×pool is the usual culprit.
Hit this after a routine bump.
Symptom: FastAPI dependency overrides without monkeypatch hell
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?
paste engine kwargs and max_connections. worker×pool is the usual culprit.
orjson helped CPU a few percent; DB still the ceiling.
dropping pool_size per worker fixed it for us on the same box size.
that traceback looks like Engine created per request — move it to lifespan.
minimal repro with ASGITransport would help more than screenshots.