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

I cannot connect to PgBouncer remotely

I have postgresql installed on vultr "Ubuntu 20.04". I installed Pgbouncer for connection pooling and configure it as bellow, but but pgbouncer is rejecting connection with the vultr ip address. it is only working with "localhost (127.0.0.1)". I…
Johndev247
  • 91
  • 6
0
votes
1 answer

What is the effect disabling PreparedStatements server side in Postgres? (adding the JDBC param : prepareThreshold=0)

I'm writing a client side tool that is querying a Postgres DB using PreparedStatements. I'm running into some issues. This tool has to support a wide variety of Postgres setups. Some of these setups use pgBouncer in transaction pooling mode, which…
Dev K
  • 41
  • 2
0
votes
0 answers

Python Subprocess causining error: 'got too long value, skipping' in PgBouncer when asyncpg is doing inserts

I have a python script. When running it in console everything is fine. When starting it as a subprocess subprocess.Popen((sys.executable,python_file_path),universal_newlines=True, shell=False, creationflags=NO_WINDOW) Everything seems to work as…
MichaelRazum
  • 789
  • 1
  • 10
  • 26
0
votes
1 answer

Django - k8s - django.db.utils.OperationalError - redis.exceptions.ConnectionError - requests.exceptions.ConnectionError

I'm running a django + postgrsq/pgbouncer + redis project on Kuerbenetes (OVH public cloud) Each on their own pod and I sometimes encounter this kind of error django.db.utils.OperationalError: could not translate host name "pgbouncer" to address:…
wzxecr
  • 11
  • 4
0
votes
0 answers

pgbouncer + SQLAlchemy on "high?" load produces "high level exception...(psycopg2.OperationalError) could not connect to server: Connection timed out"

I have a datawarehouse type environment with dozens of workers sending queries through a pgbouncer proxy. Its been running for a couple years now with mostly no issues. Just recently we started getting this error: high level exception for item:…
Alexi Theodore
  • 1,177
  • 10
  • 16
0
votes
1 answer

PGBouncer-Azure Database for PostgreSQL Flexible Server

I created a new database in Flexible Server and enabled the pgbouncer. When I run SHOW DATABASE, it only displays two databases. How to assign a newly created database to pgbouncer.please find the screenshot
remo
  • 3
  • 2
0
votes
1 answer

PgBouncer fails to keep min_pool_size server connections at startup

I expect min_pool_size server connections to be created when PgBouncer starts. However, that does not happen (for example, there are ~46 connections, and after some time ~80 ...). Is it possible that PgBouncer does not create all the connections…
Pocke
  • 23
  • 5
0
votes
1 answer

How to add servicemonitor for pgbouncer-exporter metrics

I have added pgbouncer-exporter container to my deployment. It is emitting the metrics on port 9100. I want to add a scraper for these metrics so that it becomes visible in Prometheus. How can I do it by using Kubernetes ServiceMonitor?
Dev
  • 794
  • 1
  • 9
  • 21
0
votes
1 answer

django.db.utils.OperationalError: ERROR: no more connections allowed (max_client_conn)

I have a django app running on kubernetes with postgrsql / pgbouncer I encounter the following error on some requests when I run 2 Django replicas (this doesn't seem to happen if I only set 1 replica) I only have one database Django…
wzxecr
  • 11
  • 4
0
votes
1 answer

ERROR: prepared statement_* doesn't exists

I am 4 days can't resolve my issue and sadly, but chatGPT also weak on this. In short: I have Go, Gin-gonic v1.9.0 API which using Gorm ORM v1.24.5 and Postgresql server v14 hosted on the Digitalocean. I also enabled the PgBouncer feature with…
0
votes
0 answers

pgBouncer 1.17 to 1.18 results in fatal "server_proto: server in bad state: 14" during query cancellation

I've noticed since upgrading from pgBouncer 1.17 to 1.18 (but not otherwise changing my configuration) that canceled queries result in a fatal error that crashes the service, i.e. 2023-02-23 03:29:32.097 UTC [27246] LOG started sending cancel…
dumbchemistry
  • 384
  • 1
  • 5
  • 21
0
votes
0 answers

pgbench benchmark rises using pgbouncer

I've got Postgres 13 and PGbouncer. When I make pgbench test, when I rise client connection and quantity of query, tps also rises. Why? For example: pgbench -U postgres -h .... -p 6544 datafactory -c 700 -j 8 -t 50 -S latency average = 1591.633…
Gerzzog
  • 95
  • 7
0
votes
1 answer

Prepared statements Issue with pgBouncer with 'transaction' pool_mode

I have Prepared statements Issue with pgBouncer in 'transaction' pooling mode. This Rust code: use postgres::{Client, Error, NoTls}; fn main() -> Result<(), Error> { let mut client = Client::connect( …
0
votes
0 answers

Postgres schema access changes before and after pg_dump

I have a Postgres database defined with the public schema and it is accessed from within a Python application. Before doing a pg_dump, the tables can be accessed without using a qualified table name, for example select * from user works. After…
0
votes
0 answers

Pgbouncer how to test usefullness using query

I've got Postgres 13 version and PG-bouncer. How can I using connection and query to database test usefulness of pgbouncer? I mean start query which generate connections or other and at the end of test we see that time of query is lower, or workload…
Gerzzog
  • 95
  • 7