0

I have PostgreSQL 12, pgbouncer, and Geoserver 2.21.0 running on my Ubuntu 20.04 Virtual Machine (VM). Postgres is behind pgbouncer (connection pooling) and pgbouncer.ini, among other things, specifies the max number of connections, idle timeouts, etc.

I have also connected Geoserver to the postgres via pgbouncer. Since geoserver also has an internal connection pool given by the following options (while adding postgis store), my question is, how do I handle these settings? For the time being, I have kept the default options. But, should these settings (e.g. max_connections, idle) be aligned with the pgbouncer configuration?

geoserver connection pooling

CHAHI Saad
  • 309
  • 4
  • 15
khajlk
  • 791
  • 1
  • 12
  • 32
  • 1
    Why are you using pgbouncer in the first place? It seems kind of pointless when the app has a builtin pooler. – jjanes Feb 20 '22 at 15:26
  • Good point! It is because, I have API services running over postgres database to handle CRUD ops, and due to expected several concurrent connections, pgbouncer was the optimal workaround.. makes sense? – khajlk Feb 20 '22 at 16:24
  • Geoserver has these connection settings *per map*. So if you have 20 maps each going to the same database server, you have to set min/max connections for every map. And if you set a max of 10, you still have 20x10=200 possible connections. At least, that's my impression. So a pgbouncer in between could really cut down on the number of connections. – Reinout van Rees Aug 29 '22 at 15:04

0 Answers0