Questions tagged [pgbouncer]

For questions about PgBouncer, a connection pooler for PostgreSQL.

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

pgBouncer exceeds connection limit even with idle connections

I'm using pgBouncer to balance connections in PostgreSQL. Sets a limit of 2048 connections in the PostgreSQL main configuration and also in pgBouncer. It happens that there are several connections ...
0
votes
1answer
39 views

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 ...
0
votes
0answers
25 views

pgbouncer: login rejected

The second day I can not overcome the connection error through pgbouncer if I use auth_type = hba postgres=# create user monitoring with password 'monitoring'; postgres=# create database monitoring ...
0
votes
0answers
31 views

PgBouncer user_lookup function for multiple databases

I would like to create a pgbouncer.user_lookup function (https://pgbouncer.github.io/config.html#example) and update the auth_query parameter in order to not rely on userlist.txt file. In case my ...
0
votes
0answers
15 views

PgBouncer for connections from both application and developers

I have 2 scenarios: "hide" PostgreSQL for all (developers and application) and let them connect to the database only through PgBouncer; use PgBouncer only for application and let developers connect (...
0
votes
1answer
267 views

HA PostgreSQL installation using patroni and pgbouncer

I'm not having a problem yet, just searching for advise I want to build installation of PostgreSQL on 3 nodes using patroni: master and 2 standbys (for failover only). There are PostgreSQL and ...
0
votes
0answers
18 views

Weird results when querying PostgreSQL (lower performance when requesting a small string than requesting a larger string)

I’m developing an experiment where I want to analyze the impact of the database in a web application. The experiment consists of searching for 1 string on the database according to an ID and returning ...
2
votes
0answers
112 views

Should I connect to my replica through PgBouncer?

We're using a setup of one Postgresql master server and a several replicas to be able to withstand master failure. Connection to master server is made through PgBouncer. Currently the idea is that ...
0
votes
1answer
1k views

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: ...
1
vote
0answers
158 views

“Unclean server” connections not being cleaned up

I have an application connecting to a PostgreSQL server via PgBouncer, all running in Kubernetes. Every couple of minutes, the PgBouncer process seems to crash, and Kubernetes restarts it. Just before ...
0
votes
1answer
275 views

pgbouncer bind(): Permission denied

I have pgbouncer running locally with config: [databases] * = host=myremoteIP port=5432 user=postgres listen_addr = * listen_port = 6432 When I connect using pgsql using: psql -h 127.0.0.1 -p 6432 -...
0
votes
0answers
3k views

org.postgresql.util.PSQLException: This connection has been closed. error for long running transactions

We are getting "org.postgresql.util.PSQLException: This connection has been closed." on one of our deployments for only long running transactions (more than a few minutes): Caused by: org.hibernate....
1
vote
1answer
700 views

Improve pgBouncer configuration

What is the best configuration for pgBouncer in my case? I have only 1 database, 1 user and the max_connections in postgresql.conf is 1024. The currently config of my pgbouncer.config is: ...
1
vote
0answers
56 views

How Can I change pgbouncer pooling Point? Please help

Good morning, I have more important questions that PGbouncer in postgreSQL module. I saw lot of many threads, but I can't solved it. so, I'm crave answer my question. The questions are: I am using ...
0
votes
1answer
686 views

Load Balancing PG Bouncer With HA Proxy

I have a server with two instances of PG Bouncer running on different ports. Both are using session mode to pool. I set up HA Proxy to load balance incoming connections between these two processes to ...
3
votes
0answers
1k views

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 ...
1
vote
2answers
2k views

Psycopg2 - PGBouncer - Postgresql > Server does not support SSL but SSL was required

I've setup my Django application to use SSL while connecting to the Postgresql database via pgbouncer. I'm using Psycopg2 library. I've done this before successfully, so I just did the same steps ...
1
vote
1answer
607 views

Postgresql: newly created database does not exist

Recently I faced strange error. I'm running Postgresql behind pgBouncer. I created new database in pgAdmin (connected through pgBouncer). It shows up on the list, but when I try to select it I get ...
2
votes
1answer
681 views

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 ...
0
votes
1answer
2k views

PgBouncer log management

My pgbouncer.log grows endlessly. How do I enable filename rollover or limit the logfile size for pgbouncer on Ubuntu?
3
votes
2answers
841 views

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 ...
2
votes
1answer
506 views

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 ...
1
vote
1answer
272 views

How expensive is a connection to pgbouncer?

Is a connection to pgbouncer cheaper than a connection to PostgreSQL (assuming pgbouncer has already established a connection to PostgreSQL) ? How is the connection to pgbouncer made ? I found the ...
0
votes
1answer
155 views

Is there a way to prevent “reset role” in PostgreSQL

Is there a way to prevent a user from running "reset role" in PostgreSQL, and thus gaining permission he may not have ? I have an architecture with many databases on a single server. An API connects ...
3
votes
1answer
2k views

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 ...
0
votes
2answers
308 views

pgbouncer on separate server than postgresql

Right now I am hosting postgresql and pgbouncer on the same Linode with 48GB of RAM and 12 Cores. The server gets many short lived connections per second. The server load will increase with time and ...
0
votes
1answer
2k views

can't connect to pgbouncer administration database

I installed pgbouncer and I setup the pgbouncer.ini and my application can connect to pgbouncer and make queries. But when I try to connect to the virtual administration database of pgbouncer by ...
5
votes
1answer
429 views

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 ...
0
votes
1answer
3k views

pgbouncer 1.7 with TLS/SSL client and server connections

With settings borrowed from a similar server running Postgres 9.4.1 & pgbouncer 1.6.1, I have multiple users connecting to the database through pgbouncer on port 6543. I also have a second server ...
1
vote
1answer
360 views

Pgbouncer server parameter

I installed and configured pgbouncer 1.5.4 on Ubuntu 14.04 LTS and I have a hard time interpreting log messages. Basically, I have seen many errors: 2015-12-10 18:09:16.835 30488 ERROR ...
3
votes
0answers
742 views

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 ...
1
vote
1answer
506 views

Log large queries with PGbouncer

Is there a way to ask pgbouncer to log any query that generates a result set larger than, say, 5MB?
0
votes
1answer
1k views

Working with Materialized View

I have a materialized view which takes around 57 second to be created and I'm using PostgreSQL 9.4. When I do an insert into a table, a trigger will call a trigger function which will do a REFRESH ...
1
vote
1answer
355 views

Connection pooling with 3 databases but 1 database as master for repmgr replication?

I'm using pgbouncer for connection pooling against 3 database on different servers, now I'm planning to use repmgr for replication, my question is, can I keep doing connection pooling on these 3 ...
0
votes
0answers
76 views

Cascading pgbouncer setup?

I am wondering if anyone has tried a cascading pgbouncer setup, where pgbouncer A connects to pgbouncer B and that in turn connects to postgres. From 1Km away this seems a possible setup, but I am ...
2
votes
1answer
1k views

PGBouncer Pause Waits for Remote Connection to Close

I'm testing the pgbouncer "pause" feature to minimize database downtime when a database restart is required. For this test, I have a remote psql session connected to my database through pgbouncer. ...
3
votes
2answers
4k views

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 ...
1
vote
1answer
820 views

Meaning of query in pgbouncer.log

I could not find any documentation about pgbouncer log, I'm assuming it has the same meaning as the SHOW STATS ? req/s - number of requests since last stat period in b/s - Bytes per sec received ? ...
3
votes
1answer
2k views

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 ...
9
votes
1answer
7k views

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: ...
1
vote
1answer
334 views

What configuration to use for PGbouncer over a WAN link

We have two datacenters, one in America and one in Europe. For various reasons, the Europe datacenter has the database server, while the workers and web apps are in America. PGbouncer is in the ...
16
votes
2answers
23k views

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: ...
1
vote
1answer
1k views

Monitoring real-time statistics on PostgreSQL

I need to monitor the DB performance on a distributed system with multiple databases. Some of the database servers use pgbouncer to pool connections and in those servers I can connect to pgbouncer and ...
6
votes
2answers
4k views

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, ...
6
votes
2answers
6k views

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 ...