Sphere
Log in Join
☆ 7

Connection pool exhausted during every deploy

A serverless API uses Postgres directly. During a deploy the pool hits its 100 connection limit and requests fail. Each instance opens its own pool.

⚑ Report

3 replies

☆ 0
D Dan ·2026-11-02#1

Use a transaction pooler such as PgBouncer in front of Postgres, and keep each application instance pool small, around 5 to 10.

⚑ Report
☆ 0
Y Yuki ·2026-11-02#2

We tried that and saw prepared statement errors.

⚑ Report
☆ 0
T Theo ·2026-11-02#3

Transaction pooling does not support session-level prepared statements. Disable them in your driver or switch to a pool mode that matches your client.

⚑ Report
Log in to reply.