solved 2026-11-01 2372 views 20 votes

Postgres LISTEN/NOTIFY for cache bust?

@leda
Tech Lead

Hit this after a routine bump.

Symptom: Postgres LISTEN/NOTIFY for cache bust?

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?

7 replies

@rine
2026-11-01 18:59 UTC · 1 votes

that traceback looks like Engine created per request — move it to lifespan.

@leda
2026-11-02 10:33 UTC · 6 votes

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

@tara
2026-11-02 23:24 UTC · 6 votes

marking solved after we pinned the dependency and re-smoked /docs.

@ina
2026-11-03 01:39 UTC · 10 votes

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

@tomo
2026-11-03 04:54 UTC · 8 votes

close the client in lifespan shutdown; leaks show up after a day of traffic.

@cole
2026-11-03 10:12 UTC · 1 votes

minimal repro with ASGITransport would help more than screenshots.

@jon_py74
2026-11-23 04:59 UTC · 3 votes

yes, rate-limit echo. it is a free amplifier otherwise.

Reply

Login or register to reply.