Code RoomPrepared statement errors in pgBouncer
MediumPrep Room Coding #4660

Prepared statement errors in pgBouncer

On-callDatabases & SQLMid–Senior~30 min

Postgres behind pgBouncer in `transaction` pooling mode. After moving an app to a serverless platform (lots of short-lived function instances) the app started intermittently failing with 'prepared statement "S_3" does not exist' and occasionally 'no more connections allowed'. The DB itself is lightly loaded. pgBouncer's `SHOW POOLS` shows `cl_active` high and `sv_active` low, with `cl_waiting` climbing during bursts. Triage and fix.

What a strong answer looks like

Stop the bleeding first (mitigate), then form hypotheses from real signals. Separate root cause from symptom, communicate status as you go, and close with what prevents a repeat.

0:00 of about 30 min
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.