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

The difference of pgBouncer pooling types

I was reading about pgBouncer and couldn't completely understand how different types of pooling work: Session pooling Most polite method. When a client connects, a server connection will be assigned to it for the whole duration the client stays…
mouse_00
  • 593
  • 3
  • 13
2
votes
1 answer

airflow 2.1.3 using pgbouncer for postgresql issue

back ground info: recently we upgraded the airflow from 2.10.14 to 2.1.3, the pgbouncer was using customised container built from azure microsoft image (mcr.microsoft.com/azure-oss-db-tools/pgbouncer-sidecar:latest). the customised pgbouncer stopped…
2
votes
1 answer

pgbouncer and scram-sha-256 setup

I was able to get SCRAM-SHA-256 authentication to work with pgpool, but I haven't been able to find a good example how to set this up in pgbouncer. I'm trying to use auth_query. In postgres, the user that pgbouncer will connect as has the password…
vamfoom
  • 61
  • 2
  • 6
2
votes
1 answer

How to get pgbouncer stats with .NET (c#)

I want to show some pgbouncer stats in a simple wpf client (npgsql), but I can't connect to pgbouncer. The connect to a postgresql database via pgbouncer is working well, but the connect to pgbouncer admin database is not. With the used credentials…
Dave_B.
  • 173
  • 10
2
votes
0 answers

PgBouncer: closing because: client close request and closing because: unclean server

Although my web app works fine and the data is written into DB without issue. I check the log of PgBouncer, it is showing high amount of pgbouncer_1 | 2021-04-13 10:45:47.061 UTC [1] LOG C-0x7f7f368200e0:…
Cheok Yan Cheng
  • 47,586
  • 132
  • 466
  • 875
2
votes
0 answers

Vertx unnamed prepared statement does not exist(PgBouncer)

When I attept to execute any request(through pg bouncer), then get exception Caused by: io.vertx.pgclient.PgException: { "message": "unnamed prepared statement does not exist", "severity": "ERROR", "code": "26000", "file": "postgres.c", "line":…
maestro
  • 21
  • 1
2
votes
1 answer

PG::UnableToSend: no connection to the server in Rails 5

I have 2 servers(A, B). I am running rails app in A and db in B. In server B, I have pgbouncer and postgresql running. When I run 200 threads in A, I am getting that issue even though I increased pgbouncer max client connection to 500. And pgbouncer…
Francesco Tagliani
  • 109
  • 1
  • 1
  • 10
2
votes
3 answers

PHP and pgbouncer in transaction mode: current transaction is aborted

I run a Drupal 7.2 web site embedding a flash game with few custom PHP scripts for the player stats. Using CentOS 5.6/64 bit, PostgreSQL 8.4.8 and PHP 5.3. It is a Quad-Opteron with 4GB RAM. At the peak times (when there are around 500 players…
Alexander Farber
  • 21,519
  • 75
  • 241
  • 416
2
votes
1 answer

Django Heroku, server does not support SSL, but SSL was required

I have a Django application deployed to Heroku and Postgres, I'm trying to add pgbouncer to scale the app a bit, but I'm getting this error: django.db.utils.OperationalError: server does not support SSL, but SSL was required as a lot of other…
user12177026
2
votes
1 answer

Is there a way to execute a query with placeholders without preparing the function?

My codebase has a potential vulnerability of SQL injection that I'd like to secure. I have a few queries in my codebase where I put variables in plain text, like this: ActiveRecord::Base.connection.execute( %{ SELECT ... …
user3935328
2
votes
2 answers

What's the difference between ORM/query builder library connection pool size and pgbouncer connection pool size?

I am confused about pgbouncer pool size configuration and ORM(like sequelize.js), query builder(like knex.js) library pool size configuration. The architecture like this: Application code => pgbouncer => postgresql pgbouncer.ini: ;; ... ;; Default…
Lin Du
  • 88,126
  • 95
  • 281
  • 483
2
votes
1 answer

PgBouncer throwing PSQLException: ERROR: unsupported pkt type: 80 when issuing query "SHOW POOLS" on "pgbouncer" database via JDBC

When trying to issue "SHOW POOLS" or any stats query command on pgbouncer database via JDBC, facing the below exception. org.postgresql.util.PSQLException: ERROR: unsupported pkt type: 80 …
sai
  • 93
  • 8
2
votes
1 answer

Use Keycloak with pgbouncer

I have a postgresql with pgbouncer. Key cloak is deployed to kubernetes, the image is: jboss/keycloak I want to be able to control the number of connections keycloak is using. I see two options: modify keycloak to connect to pgbouncer instead of…
Alireza
  • 5,421
  • 5
  • 34
  • 67
2
votes
0 answers

How to connect to pgbouncer from asyncpg library?

I have implemented pgbouncer with asyncpg and also asyncpg native pool implementation. Though i'm able to send many concurrent request through pgbouncer but my p95 is close to 8sec for 1000 concurrent request where as with asyncpg native pool…
Mohsin Mumtaz
  • 63
  • 1
  • 11
2
votes
1 answer

Prevent pgbouncer from logging to syslog on Centos 7

Stock installation of pgbouncer on centos 7. It logs connections/stats/etc to both /var/log/messages as well as /var/log/pgbouncer/pgbouncer.log. How do I stop it from logging to /var/log/messages?
Mark Fletcher
  • 701
  • 1
  • 14
  • 36