Questions tagged [pgbouncer]

For questions about PgBouncer, a connection pooler for PostgreSQL.

83 questions
22
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)…
14
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
  • 243
  • 1
  • 2
  • 5
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
  • 1
  • 3
  • 8
9
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
  • 257
  • 1
  • 4
  • 12
8
votes
2 answers

Pgbouncer getting auth failing when trying to connect using psql

I'm trying to configure the latest pgbouncer to work with postgres 9. I can connect to my db using psql with the right password but when I use psql -p 6432 I can't connect with the error message of psql: ERROR: auth failed This seems like it might…
Josh Kirby
  • 121
  • 1
  • 2
  • 6
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,588
  • 5
  • 18
  • 25
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

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
  • 245
  • 2
  • 9
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
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
  • 171
  • 1
  • 8
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
  • 6,747
  • 1
  • 19
  • 32
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
  • 2,079
  • 8
  • 31
  • 44
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
  • 245
  • 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
  • 171
  • 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
1
2 3 4 5 6