0

current setting of a pgbouncer server is the following - and what I don't understand is the 'free_servers' info given by the show lists command when connecting to pgbouncer. Is it a (soft or hard) limit on the number of connexion to the postgresql databases used with this instance of pgbouncer ?

configuration :

max_client_conn = 2048
default_pool_size = 1024
min_pool_size = 10
reserve_pool_size = 500
reserve_pool_timeout = 1
server_idle_timeout = 600
listen_backlog = 1024

show lists gives :

pgbouncer=# show lists ;
   list           | items  
   ---------------+--------
   databases      |      6
   pools          |      3
   free_clients   |    185
   used_clients   |     15
   free_servers   |     70
   used_servers   |     30

it seems that there is a limit at 30 + 70 = 100 servers, but couldn't find it even review configuration values with show config, and documentation doesn't explicit which configuration to change / increase free_servers.

pgbouncer version : 1.7.2

EDIT : I've just discover that, for a pool of 6 webservers configured to hit the same PG database, 3 of them can have 200 backend connexions (server connexion), and 3 of them can only make and maintain 100 connexions (as described in the first part). But, .. the configuration is exactly the same in pgbouncer configuration file, and the servers are cloned VM. The version of pgbouncer is also the same.. So far, I still haven't found documentation on internet where this limitation come from...

Enialis
  • 173
  • 1
  • 9

1 Answers1

0

This data is just some internal information for PgBouncer.

Servers information is stored inside an array list data structure which is pre-allocated up to a certain size, in this case that is 100 slots. used_servers = 30, free_servers = 70 means there are 30 slots currently in used, and 70 slots free. PgBouncer will automatically increase the size of the list when it's full, hence there's no configuration for this.

Kien Truong
  • 11,179
  • 2
  • 30
  • 36