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
9
votes
3 answers

pq driver: prepared statement does not exist

I'm trying to connect to a postresql database with the pq driver in Go. When I do it on a local copy of the database, with a connection string like DB, err = sql.Open("postgres", "user=user password=pwd dbname=mydb sslmode=disable") it all works…
snikolenko
  • 135
  • 1
  • 2
  • 6
8
votes
1 answer

django can't drop the test DB via pgbouncer

I'm using pgbouncer with Django. I've added test_foo database to its config to be able to run tests, because apparently Django can't use a different port for the test DB. Now the test run but at the end, when Django tries to drop the test DB, I…
wRAR
  • 25,009
  • 4
  • 84
  • 97
8
votes
0 answers

multiple databases - common connection pool using pgbouncer

We have a multi tenant set up with one database for each tenant in a single server. Is it possible to main a common pool for all databases with pgbouncer? Our number databases in one server can range in a few hundreds. While I can have a large…
Raj
  • 135
  • 2
  • 11
8
votes
0 answers

knex.js with pgbouncer

I am looking at implementing pgbouncer. We are using knex.js in our node app and as far as I can tell there is no way to disable it's built in connection pooling. What would be the best option for handling this?
ksp
  • 91
  • 2
7
votes
1 answer

Rails, PgBouncer and DigitalOcean — how to work with Databases Connection Pools?

Recently in DigitalOcean has the opportunity to create Databases. This is something like a turnkey solution based on the usual Droplet with a bunch of additional database features. One of these additional features — Connection Pools. As far as I…
Colibri
  • 993
  • 11
  • 29
7
votes
1 answer

Pgbouncer - managing dynamic db settings

We are considering using pgbouncer for our project, which includes dynamic db creation (i.e each and every tenant that is added - a new db created) As far as I understand, pgbouncer takes a config file that maps the databases. The question is - is…
gCoh
  • 2,719
  • 1
  • 22
  • 46
7
votes
0 answers

pgbouncer can not connect to server

i have install and configure pgbouncer on windows. pgbouncer service is running but when i connect it with postgres 9.6 it throws error ' pgbouncer can not connect to server ' create server with pgbouncer port pgbouncer configurations…
unknown user
  • 91
  • 1
  • 4
7
votes
1 answer

Postgres advisory lock within function allows concurrent execution

I'm encountering an issue where I have a function that is intended to require serialized access dependent on some circumstances. This seemed like a good case for using advisory locks. However, under fairly heavy load, I'm finding that the serialized…
Brock Haywood
  • 516
  • 2
  • 10
6
votes
3 answers

Laravel data mismatch error while using \PDO::ATTR_EMULATE_PREPARES => true

We have application build in Php Laravel and for the database we use postgres sql. And also on top of postgres we have configure pgBouncer to limit the maximum number of connections on server side by managing a pool of idle connections that can be…
Nileshsinh Rathod
  • 948
  • 1
  • 17
  • 37
6
votes
1 answer

connect pgbouncer and postgres running with docker

I currently tried to connect pgbouncer to postgresql with docker-compose but pgbouncer couldn't connect to postgresql. I tried to connect to pgbouncer throughoutPostgresql bash: $ sudo docker-compose ps Name Command …
Phoenix
  • 3,996
  • 4
  • 29
  • 40
6
votes
1 answer

HikariCP/Apache DBCP2 and PgBouncer

After switching to PgBouncer in a Spring application that uses HikariCP(or Apache DBCP2) do I need to make additional configuration for HikriCP(or Apache DBCP2) side?
Radu Dumbrăveanu
  • 1,266
  • 1
  • 22
  • 32
6
votes
0 answers

Pgbouncer mismatch between 'show pools' and pg_stat_activity

If I do 'show servers', it comes back with something like 40 results. If I connect to the database at the same time and do a count of connections using pg_stat_activity (only counting connections to pgbouncer), it comes back with something like 85…
Mark Fletcher
  • 701
  • 1
  • 14
  • 36
6
votes
1 answer

Amazon linux: No package pgbouncer available

trying to install pgbouncer on amazon met this: [root@somehost ~]# uname -a Linux somehost 4.4.35-33.55.amzn1.x86_64 #1 SMP Tue Dec 6 20:30:04 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux [root@somehost ~]# yum install pgbouncer Loaded plugins:…
Vao Tsun
  • 47,234
  • 13
  • 100
  • 132
6
votes
1 answer

Receiving "ActiveRecord::StatementInvalid: PG::ConnectionBad: PQconsumeInput() could not receive data from server: Connection timed out" in rake task

In my rake task, I'm connecting to postgresql via a pgbouncer setup. For some queries I receive this error: ActiveRecord::StatementInvalid: PG::ConnectionBad: PQconsumeInput() could not receive data from server: Connection timed out In my pgbouncer…
6
votes
2 answers

How do I manage connection pooling to PostgreSQL from sidekiq?

The problem I have a rails application that runs a few hundred sidekiq background processes. They all connect to a PostgreSQL database which is not exactly happy about providing 250 connections - it can, but if all sidekiq processes accidentally…
Niels Kristian
  • 8,661
  • 11
  • 59
  • 117
1
2
3
19 20