Recently, our DB server got hit by high load. When I went to investigate, there were 49 queries from the same user for the same database. I checked our pgbouncer.ini, and sure enough, default_pool_size is set to 20 (we only turned it down to 20 fairly recently, it used to be higher). There are no per-database changes, and the only per-user change is not for the user in question. Now I am checking on pools that are larger than default_pool_size + reserve_pool_size (5), and it's happening fairly regularly. E.g. in the last five minutes, from SHOW POOLS;:

                    database                    |      user       | cl_active | cl_waiting | sv_active | sv_idle | sv_used | sv_tested | sv_login | maxwait |  pool_mode  
 redacted_db                                    | redacted        |      1047 |          2 |        37 |       0 |       0 |         0 |        1 |       0 | transaction

I've checked SHOW CONFIGS to make sure the values are set as they are in pgbouncer.ini. Have I completely misunderstood how pgbouncer works? Or is there some nuance that I've missed?

1 Answer 1


After a lot of searching around, it seems that this issue came up because we did a RELOAD in order to update default_pool_size. While this updated the default_pool_size, it did NOT affect the pool size of databases that pgbouncer already knew about (which was all of them). This info was visible by doing SHOW DATABASES: they all remained at 100. Restarting pgbouncer entirely fixed the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.