Questions tagged [pgbouncer]

For questions about PgBouncer, a connection pooler for PostgreSQL.

65 questions
20
votes
3 answers

PostgreSQL High Availability/Scalability using HAProxy and PGBouncer

I have multiple PostgreSQL servers for a web application. Typically one master and multiple slaves in hot standby mode (asynchronous streaming replication). I use PGBouncer for connection pooling: one instance installed on each PG server (port 6432)…
11
votes
1 answer

pgBouncer works great but occasionally becomes unavailable

I'm running pgBouncer in front of a busy postgres 9 database. For most of the time it works fine. But every few hours I'll get an error email from my application with an exception from psycopg2: OperationalError('could not connect to server: Cannot…
Harel
  • 303
  • 3
  • 8
11
votes
1 answer

What is the purpose of session pool_mode in pgbouncer?

Since in this mode pgbouncer creates outbound connection for each inbound connection it seems to me that pgbouncer doesn't work as pooler. It's just 1 to 1 mapping. Where am I wrong?
skaurus
  • 213
  • 2
  • 5
7
votes
2 answers

Does PgBouncer create a separate pool for every database config entry?

If I set up a pgbouncer.ini config file with several database entries, does pgBouncer create a separate pool for each one? I would think so, but have not been able to confirm this. For example, with something like this: [databases] db1 = ... db2…
Juan Carlos Coto
  • 1,428
  • 4
  • 17
  • 24
6
votes
2 answers

Struggling with pgBouncer

I've got Postgres 9.2 and PgBouncer (The version that came with the 'stack builder'). I have a .net application connecting via Npgsql version 2.0.12 on a win7 machine. My application can happily connect straight to the postgres server, but always…
Peter pete
  • 211
  • 2
  • 6
6
votes
1 answer

Limit connection numbers with pgbouncer

So I have this pgbouncer config: [databases] my_db = host=10.10.10.10 my_db_with_conn_limit = host=10.10.10.10 dbname=my_db pool_size=55 max_client_conn = 300 default_pool_size = 65 reserve_pool_size = 5 reserve_pool_timeout = 1 And the goal is…
5
votes
1 answer

pgbouncer and ssl connection

I have three Servers, two of whom are running postgres 9.5.3 and the third runs pgbouncer 1.7.2. i can access one of the two postgresql instance through pgbouncer and it all works perfect. the other postgresql Servers, lets call it P1 is not under…
RootOfProblem
  • 235
  • 2
  • 9
4
votes
0 answers

postgresql + pgbouncer, idle server and high cl_waiting

I have such a setup: OpenSUSE 13.1 64-bit Linux kernel 3.11.10 PostgreSQL 9.0 + PgBouncer 1.5.4 (libevent-2.0) 16 core AMD, 128 GB RAM PostgreSQL config: max_connections = 1500 shared_buffers = 4GB work_mem = 20MB PgBouncer…
filiprem
  • 5,536
  • 1
  • 16
  • 29
4
votes
1 answer

PgBouncer "no more connections allowed (max_client_conn)"

I am using PostgreSQL with PgBouncer, and receive the following error in my application: 08P01: no more connections allowed (max_client_conn) pgbouncer.ini has the following configuration: max_client_conn = 100 default_pool_size = 20 pool_mode =…
Owen Pauling
  • 197
  • 1
  • 12
4
votes
0 answers

PgBouncer cannot connect to server

I have configured PgBouncer with PostgreSQL 9.6 on windows 7 machine. Here are the pgbouncer configuration settings; [databases] test = host=127.0.0.1 port=5432 dbname=master_db user=postgres password=test123 [pgbouncer] logfile = C:\Program…
Shahzad Bacha
  • 161
  • 1
  • 8
4
votes
2 answers

Should PgBouncer be installed on web application server or database server?

I have a django website where the application and database server are different. I need to install pgbouncer to enable database pooling, however, I'm confused about where to install it: web application server or database server? Note that in this…
Hassan Baig
  • 1,619
  • 8
  • 22
  • 40
4
votes
1 answer

pgBouncer does not use all available CPUs

I have a server with multiple cores that is supposed to run pgBouncer (1.7). It's working pretty well, but it utilises only one CPU core. I get pretty high latency values when I do a load test with pgbench, emulating several clients (27 ms without…
RootOfProblem
  • 235
  • 2
  • 9
3
votes
2 answers

starting pgbouncer on startup

I installed pgbouncer and configured it and it starts only via using this command pgbouncer /etc/pgbouncer/pgbouncer.ini however using service pgbouncer start it dose not start. I then set up supervior with this settings to mannage it which works…
user1940979
  • 161
  • 1
  • 5
3
votes
1 answer

PgBouncer Uncertainties

I'm trying PgBouncer for the first time with a simple Python web application (Flask + psycopg2), and I have a hard time interpreting the meaning of its log messages by simple googling. I'm basically seeing a bunch of: 2014-06-09 09:25:07.867 20980…
cjauvin
  • 131
  • 1
  • 4
3
votes
1 answer

What is the sense to use server_lifetime with PgBouncer?

I've found server_lifetime option in PgBouncer config, and I'm trying to undestand if it is really needed in our case. https://pgbouncer.github.io/config.html The pooler will try to close server connections that have been connected longer than…
raacer
  • 203
  • 2
  • 6
1
2 3 4 5