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

ActiveRecord connection errors with PGBouncer

We recently introduce PGBouncer into our stack as we were exhausting our connections to our RDS instance. Upon doing so we started to see all sorts of connection exceptions which I posted below. The only thing of note is that we use multiple…
CWitty
  • 4,488
  • 3
  • 23
  • 40
1
vote
1 answer

Azure postgres flexible server and pgbouncer max connections

I have an Azure postgresql flexible server running a General Purpose, D2s_v3, 2 vCores, 8 GiB RAM, 32 GiB storage instance and using pg_bouncer for connection pooling. At all time there are 100 active connections and when I try to connection (not…
aweis
  • 5,350
  • 4
  • 30
  • 46
1
vote
0 answers

How to set up pgbouncer in a docker-compose setup for Airflow

I'm running a distributed Airflow setup using docker-compose. The main part of the services are run on one server and the celery workers are run on multiple servers. I have few hundred tasks running every five minutes and I started to run out of db…
MrBronson
  • 582
  • 11
  • 21
1
vote
2 answers

"tlsv1 alert unknown ca" error in pgbouncer logs when pgbouncer is trying to connect with postgres using SSL/TLS

We have a k8s cluster and postgres pods are running in it. Our backend services connect to postgres K8s service. I am trying to introduce PgBouncer as proxy when connecting to postgres pods. Postgres has ssl mode enabled and we have our own ROOT_CA,…
Aman_Bhala
  • 157
  • 1
  • 8
1
vote
1 answer

Confusing pgbouncer exporter metric in Grafana

I have added 10 replicas of pgbouncer with prometheus exporter as sidecar with a deployment manifest, and this grafana chart is showing the following prom query: sort_desc( sum by (database, pod) (…
Kaizendae
  • 853
  • 11
  • 24
1
vote
1 answer

Can't connect to pgBouncer running in Docker

I'm not great at Docker so please bear with me. I have a Postgres database running and exposed to the public, I now want to use PgBouncer to connect to it. The catch is that I can't use docker compose. So I tried creating a PgBouncer container that…
lpetrucci
  • 1,285
  • 4
  • 22
  • 40
1
vote
0 answers

Are there any benefits of using PgBouncer with Session pool mode vs default pooling from Entity Framework?

I am currently migrating Postgresql installed on an Azure VM to Azure Postgres Flexible Server. One of the advantages is the ability to use PgBouncer, unfortunately in my case it is not possible to use Transaction pooling mode, due to the use of…
1
vote
1 answer

pgBouncer + Sidekiq + Rails + Heroku + multiple databases

I'm working on adding pgBouncer to my existing Rails Heroku application. My Rails app uses Sidekiq, has one Heroku postgres DB, and one TimescaleDB. I'm a bit confused about all the layers of connection pooling between these different services. I…
Macgill4444
  • 244
  • 1
  • 12
1
vote
1 answer

PostgresSQL: org.postgresql.util.PSQLException: ERROR: Unsupported startup parameter: search_path

When I try to connect to the database on postgres via jdbc, I get the following error: org.postgresql.util.PSQLException: ERROR: Unsupported startup parameter: search_path This is how I create the connection: val connection =…
Gumada Yaroslav
  • 115
  • 1
  • 10
1
vote
0 answers

How to configure Knex for a horizontally scaled system?

How should I configure Knex.js for a horizontally scaled system (Docker Swarm / Kubernetes) that uses a Postgres database. For each new process I add, the open connections to the database increases. The number of processes are not static, but I…
Per Sunde
  • 135
  • 2
  • 6
1
vote
2 answers

Closing django ORM connections in a multi-threaded environment

I have below code in standalone script which is using django orm (outside django) with multithreading. import threading MAX_THREADS = 30 semaphore = threading.Semaphore(value=MAX_THREADS) books = Books.objects.all() for book in books: book_id…
MohitC
  • 4,541
  • 2
  • 34
  • 55
1
vote
1 answer

how to build docker Image with for pgbouncer 1.12.0 with pgbouncer-rr patch?

Pgbouncer 1.12.0 with rr patch I want the docker image with pgbouncer-rr patch, does any body previously did this and run in docker. please let me know and provide the solution to this issue.
1
vote
0 answers

Spring Boot application using HikariCP and impossibl/pgjdbc-ng driver fails to connect to pgbouncer

we have implemented a spring-boot application using HikariCP and the impossibl/pgjdbc-ng driver. The application is running fine as long as the database connection url refers to a postgres database. However, when the database url contains the…
priderider
  • 21
  • 1
1
vote
0 answers

Pgbouncer super slow

We've been using pgbouncer for couple days now and found out that the bouncer is super slow. I'd like to have your feedback on what is wrong with my bouncer configuration: Pressures table is 600k rows The query I use to test: SELECT * FROM Pressures…
1
vote
1 answer

How to configure Sequel to work with PgBouncer? How to make sure Sequel doesn't use prepared statements?

According to Heroku docs all that you're supposed to do is to disable prepared statements (LINK) - hence the two questions in the title, because it is my understanding it is one and the same issue, and with Rails you'd do something like THIS but I'm…
bbozo
  • 7,075
  • 3
  • 30
  • 56