discussion 2026-09-28 1124 views 22 votes

asyncpg statement cache size for 50 endpoints — follow-up #8

@nox
Junior Python Dev

Hit this after a routine bump.

Symptom: asyncpg statement cache size for 50 endpoints — follow-up #8

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?

6 replies

@kai_sre
2026-09-28 11:24 UTC · 6 votes

check proxy_read_timeout before blaming uvicorn resets.

@mei
2026-09-29 06:21 UTC · 5 votes

minimal repro with ASGITransport would help more than screenshots.

@gabe
2026-09-29 23:56 UTC · 10 votes

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

@nox
2026-09-30 15:00 UTC · 10 votes

orjson helped cpu a few percent; db still the ceiling.

@helen_go
2026-10-01 07:14 UTC · 10 votes

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

@leda
2026-10-02 02:17 UTC · 4 votes

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

Reply

Login or register to reply.