I have an Azure postgresql flexible server running a General Purpose, D2s_v3, 2 vCores, 8 GiB RAM, 32 GiB storage instance
and using pg_bouncer for connection pooling.
At all time there are 100 active connections and when I try to connection (not using the pgbouncer) I get the error Remaining connection slots are reserved
. I can also see that there are sporadic errors on connecting that looks to be from pgbouncer as there are not failed connections on the postgresql server.
The server is configured with:
max_connections
= 100
pgbouncer.default_pool_size
= 50
pgbouncer.max_client_conn
= 5000
pgbouncer.min_pool_size
= 0
pgbouncer.pool_mode
= TRANSACTION
Should the max connections be increased or is there some other configuration that should be adjusted such that pgbouncer don't allocate all connections?