Questions tagged [pgbouncer]

pgbouncer is a lightweight connection pooler for PostgreSQL

pgbouncer is a lightweight connection pooler for PostgreSQL. Its development status is 5 - Production/Stable, available under a BSD License for Windows and POSIX operating systems and is is written in C.

292 questions
1
vote
0 answers

How to improve the connection time between flask and psycopg2

I have a flask application which connects to a postgres database. Between the flask server and the database I add a pooler connection (pgbouncer). My flask application is multithreading, so I cannot use a single connection between the database and…
mmmmmmm
  • 67
  • 1
  • 7
1
vote
1 answer

PGBouncer is not reusing connections, but keeps creating new database connections until it runs out

I have several clients (FreeRadius servers) that connect to a single central Pgbouncer. When I utilise one of these FreeRadius servers I can see that several database connections are created by Pgbouncer. select * from pg_stat_activity where datname…
Houman
  • 64,245
  • 87
  • 278
  • 460
1
vote
1 answer

pgbouncer - closing because: unexpected response from login query

My pgbouncer.ini file: [databases] * = host=127.0.0.1 port=5432 auth_user=pgbouncer_auth [pgbouncer] listen_port = 6432 listen_addr = 127.0.0.1 auth_type = md5 auth_file = ./pgbouncer_user.txt auth_user = pgbouncer_auth auth_query = SELECT usename,…
Aakash Verma
  • 3,705
  • 5
  • 29
  • 66
1
vote
0 answers

Are there reasons to keep Active Record pool size low when you use pgbouncer?

If I use pgbouncer, what are the reasons I should not just set Active Record's pool size to 99999, effectively disabling it, and leaving pgbouncer in charge of all pooling? In my case, this is with Rails 5.2. pgbouncer uses transaction pooling. I…
Henrik N
  • 15,786
  • 5
  • 82
  • 131
1
vote
0 answers

PostgreSQL pgbouncer configuration - pgbouncer user is currently not available

I have already succeded installed pgbouncer on postgresql 10 , and it created me a pgbouncer user nad from there i run pgbouncer pgbouncer.ini to start the pooling. but now when I try to install pgbouncer on another machine I can't seem to access…
hello
  • 11
  • 1
1
vote
1 answer

Can I / Should I disable Ruby On Rails Database Connection Pooling when using PgBouncer?

Can I disable Ruby on Rails connection pooling completely? And would this be okay considering PgBouncer already handles database connection pooling?
Basil Musa
  • 8,198
  • 6
  • 64
  • 63
1
vote
1 answer

Should I decrease max_connections in PostgreSQL when using PgBouncer?

Why shall I decrease max_connections in PostgreSQL when I use PgBouncer? Will there be a difference if I set max_connections in PostgreSQL's config equal 100 or 1000 when I use PgBouncer to limit connections below either?
Eng.Bassel
  • 99
  • 2
  • 12
1
vote
1 answer

How to run pgBouncer in heroku.yml with daphne

So I built a chat app and deployed it with heroku. Since I'm on hobby-dev I can only have 20 connections to postgres, so following some suggestions online I decided using pgbouncer may be a good idea. The heroku document on setting the buildpack up…
Lucy Gu
  • 369
  • 1
  • 3
  • 10
1
vote
1 answer

Can't connect to Pgbouncer using psql

I have created a docker container for PGbouncer. (Docker image from - https://hub.docker.com/r/edoburu/pgbouncer) docker run -d -it --name=pb -e DB_NAME=events -e DB_HOST=localhost -e DB_USER=postgres -e DB_PASSWORD=postgres -e…
nandeesh
  • 753
  • 7
  • 16
1
vote
1 answer

Certificate failure using tsl with pgbouncer and Postgres

Hi we are running into a problem with tls between PostgreSQL 11 and pgbouncer 1.9, both on the same host in different containers. tls enabled and is working between client and pgbouncer and between pgbouncer and PostgreSQL. The problem is that…
1
vote
2 answers

Spring Boot 2.1 App without HikariCP Connection pooler

I want to use my Spring Boot 2.1 App without any connection pooler (HikariCP in this case) since the default pooler is HikariCP ! How should I go ahead and implement this ? The use case is I want to use a common db pooler (pgBouncer) for all my…
Nitish Kumar
  • 721
  • 1
  • 10
  • 26
1
vote
0 answers

Spark JDBC and transaction pooling in PGBouncer

I am using Spark JDBC DataFramReader to query Postgres DB, the query is executed threw PGBouncer working in Transaction Pooling. From the second executed query I receive the following error: org.postgresql.util.PSQLException: ERROR: prepared…
Alex Stanovsky
  • 1,286
  • 1
  • 13
  • 28
1
vote
1 answer

pgbouncer: user,password per pool

I'm trying to setup a pgbouncer pool that connects to the database using a pool definition that includes a user and password. Subsequently each client application should connect using a different user and password. The idea is that one pool is…
Bernie Lenz
  • 1,967
  • 23
  • 45
1
vote
1 answer

Why psql ask to enter password when trying to connect using pgbouncer

I've install pgbouncer-1.7.2 on the same Linux server as PostgreSQL-9.6 database. When I try to connect to my local database using pgbouncer, database ask to enter password. For example: psql -p 6432 -U postgres -d mydb10 -h localhost **Password…
1
vote
2 answers

Postgresql - prepared statements vs connection pooling - is it a tradeoff?

It's my understanding that you can use prepared statements or connection pooling (with tools like pgPool/pgBouncer) with Postgresql, but can benefit from only one at the same time (at least with Npgsql driver for .NET, plus library author suggests…
chester89
  • 8,328
  • 17
  • 68
  • 113