Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ubwQV-0078aY-TA for pgsql-general@arkaria.postgresql.org; Wed, 16 Jul 2025 07:19:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ubwQT-008Kaz-0a for pgsql-general@arkaria.postgresql.org; Wed, 16 Jul 2025 07:19:37 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ubwQS-008Kap-F5 for pgsql-general@lists.postgresql.org; Wed, 16 Jul 2025 07:19:37 +0000 Received: from mail-yb1-xb30.google.com ([2607:f8b0:4864:20::b30]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ubwQR-007XbX-0M for pgsql-general@lists.postgresql.org; Wed, 16 Jul 2025 07:19:35 +0000 Received: by mail-yb1-xb30.google.com with SMTP id 3f1490d57ef6-e8bc3b24662so256298276.3 for ; Wed, 16 Jul 2025 00:19:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1752650374; x=1753255174; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=tmU+RfVB+mwu2XSoiUcwSI2PU1/2CmEi9/jlcSSROts=; b=TT3y6ZiWjPk4jR/wN9EyMncFtIDw5ae7dZNLDeVXFv4r1aghkjvHpeoZ9h1+GoStUN iPgTBxfD99oy7o2PgILDMndPKhHXIIL/K5R9Slbq+bDINaJaOrcmXu3wwbNen2vfy0bh v/H6VbSPSvKtaBb4uNfvHoWdBVypqujKTgcxrZCbx6zdObbr0bI5y5JJDN3FHf/71X7z kcm3L0Q/s+9a/Terxz8vaYqeRu57y4RrE8FyDaccVe9xLRu/VDC6fXTh0uoQ+pNyBAFG LT2zLmr1OhwBdqhCnGzHYvfOfcBfPz+M5UIHVCq+x32YhLjKXrF03pCQn+d0h1A9ztwz snqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752650374; x=1753255174; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=tmU+RfVB+mwu2XSoiUcwSI2PU1/2CmEi9/jlcSSROts=; b=ljNIY2HBhkhqjMAsJdD1DFRDP64CYXub7t80yfYKR8Db5CUFuHFMa7zoiBk59LxZcj mAYJb70skqWzmMWN1vvs15sds9IpqEPP/auBZMsJpmgWBGg88Fe5jsQ4CodubP8Rd65y H+iEn7gCQrf9I9UsfXgm76h3y6hiIKuhYXNAhNmmghSvqOiwr1nUCttls1zfy0Ug/6dB FFRm8GoSTpfbVkMHmB0IzxN2zEwYgb5bH1JPgp6pmE/i7354cQ8aSwIc6ISs8Thr4YZK HNiGmLe+tIukFToTzfgDnW94IKf7PuM3DzTMCUlShsRGqTjuvDpd3h15Yk/fhS/zxpFk qyvg== X-Gm-Message-State: AOJu0YyO+47tkfmQ2cFp3LM4mhSJJ1eId0xQ68Abzl+wdmEdmc7HaD2N tVB91TMyNcEa6/MUS90RjYVhEM8Jvlg2+Qt5CKnOdW8huBfBwFStKCSF1Ynm50hZRqGWnZ/ynZx I+SAseXJDESl1lWC1o7ea2FXUCUcZ9la+FhJU X-Gm-Gg: ASbGncvW53xdAmAQrIfpUdUnkJX0FTECinO+46DxQcVDoje+V08EPDd1hF1kLPZz5DQ 6j59FR65WRUdANqAVSSlQbgIWxzmQr10eivV16CbhwtFeQmVwA45/IjS1x/fkQjRMzR5FrBYYIz Lb5vE7KpnxxvOGBmIfI8qC2hyHt9NusvWKmgFunr/To0dLt96D7dwclgLQIjOpW0eEeRSnzLvix ZKIHg7h X-Google-Smtp-Source: AGHT+IG/ZXL8KpQA/aYka2/DCdlz6hThwSlZOchHW/e4DmxQZhIrGUOwJq9WRlof2ifE6E6f4xPhvtU3EKP6QSGkr+8= X-Received: by 2002:a81:ff08:0:b0:718:4095:89bc with SMTP id 00721157ae682-718409593ffmr670167b3.22.1752650374114; Wed, 16 Jul 2025 00:19:34 -0700 (PDT) MIME-Version: 1.0 From: KK CHN Date: Wed, 16 Jul 2025 12:52:54 +0530 X-Gm-Features: Ac12FXwS_hqgMNmDQIoSBcpjG5o82cm77diHXuVufrwb3Q4ChU7KhD4Mt8sCXYU Message-ID: Subject: PgBouncer-Postgres : un supported startup parameter statement_timeout To: pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000f6f2f8063a06b6cd" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000f6f2f8063a06b6cd Content-Type: text/plain; charset="UTF-8" Hi, I am facing an issue with PgBouncer-Postgres setup, *PgBouncer (PgBouncer 1.23.1 running on VM instance FreeBSD 14.2) and PostgreSQL DB cluster on a virtual machine (PG version 16.0, RHEL 9.4) *. My application backend is nodeJS which throws the following Error in the nodejs console log: when connecting through pgbouncer to the backend database server... ERROR thrown: my-node>* Failed to connect to PostgreSQL database transaction_db : unsupported startup parameter: statement_timeout *{"code":"08P01", "length":69, "name": "error", xx xx my-node> error:[object Object ] {"timestamp":"15-07-2025 10:14:26"} x x xx Note: The nodejs apps earlier directly establishing connections to the PostgreSQL DB ( no such errors) now redirected via Pgbouncer throws this error. *The config parameters for pgbouncer as follows(correct me if any mistakes made)* [root@pgbouncer ~]# grep ^[^';;;'] /usr/local/etc/pgbouncer.ini [databases] transaction_db = host=dbmain.mydomain.com port=5444 dbname=transaction_db [users] [pgbouncer] Logfile = /var/log/pgbouncer/pgbouncer.log pidfile = /var/run/pgbouncer/pgbouncer.pid listen_addr = * listen_port = 5444 auth_type = md5 auth_file = /usr/local/etc/pgbouncer.users admin_users = adminuser stats_users = adminuser, pool_mode = transaction server_reset_query = DISCARD ALL server_reset_query_always = 1 ignore_startup_parameters = extra_float_digits // I have added this also or can I add these options too in the following line ? ;; ignore_startup_parameters = extra_float_digits, options, statement_timeout, idle_in_transaction_session_timeout // doubt options supported in latest versions ? max_client_conn = 5000 // can I give this much high value ? default_pool_size = 20 min_pool_size = 10 reserve_pool_size = 10 reserve_pool_timeout = 5 max_db_connections = 100 max_user_connections = 30 server_lifetime = 3600 server_idle_timeout = 600 // is this a low value or need to be increased ? [root@pgbouncer ~]# The config params of N*odeJS application which uses nodejs connection pooling in* code as follows the Node JS application using the following nodejs pooling configurations for the application level *cat app_10072025/config/pg-pool-config.js* ....... *const poolOptions = { max: 10, min: 2, idleTimeoutMillis: 600000, //Idle for 5Min connectionTimeoutMillis: 10000, //Reconnect 10sec statement_timeout: 60000, //Query executiion 1 min acquire: 20000, maxUses: 1000 //reconnect after 1000 queries};* const pools = { transaction_db: new Pool({ connectionString: `postgresql://${DB_USER}:${DB_PASSWORD}@ ${DB_HOST}:${DB_PORT}/${DB_NAME_TRANSACTION_DB}`, ...poolOptions, }), }; .................................. Any hints and suggestions in the config params are most welcome. Thank you, Krishane --000000000000f6f2f8063a06b6cd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I am facing an issue with PgBouncer-Postgr= es setup,=C2=A0

PgBouncer (PgBouncer 1.23.1 running on VM instan= ce FreeBSD 14.2) and PostgreSQL DB cluster on a virtual machine (PG version= 16.0, =C2=A0RHEL 9.4)=C2=A0. =C2=A0


My=C2=A0application bac= kend is nodeJS which throws the following Error in the nodejs=C2=A0 console= log: when connecting through pgbouncer to the backend database server...= =C2=A0

ERROR thrown:

my-node>=C2=A0Fa= iled to connect to PostgreSQL database transaction_db : unsupported startup= parameter: statement_timeout=C2=A0{"code":"08P01",= "length":69, "name": "error", xx xx
my-no= de> error:[object Object ] {"timestamp":"15-07-2025 10:14= :26"} x x xx


Note:=C2=A0 =C2=A0The nodejs apps =C2=A0earlie= r directly establishing connections to the =C2=A0PostgreSQL DB ( no such er= rors) =C2=A0now redirected via =C2=A0 Pgbouncer throws this error.
=C2= =A0 =C2=A0

The config parameters for =C2=A0pgbouncer as follows(c= orrect me if any mistakes made)

[root@pgbouncer ~]# grep ^[^'= ;;;;'] /usr/local/etc/pgbouncer.ini
[databases]
transaction_db = =3D host=3Ddbmain= .mydomain.com=C2=A0port=3D5444 dbname=3Dtransaction_db

[users][pgbouncer]
Logfile =3D /var/log/pgbouncer/pgbouncer.log
pidfile = =3D /var/run/pgbouncer/pgbouncer.pid
listen_addr =3D *
listen_port = =3D 5444
auth_type =3D md5
auth_file =3D /usr/local/etc/pgbouncer.use= rs
admin_users =3D adminuser
stats_users =3D adminuser,
pool_mode = =3D transaction
server_reset_query =3D DISCARD ALL
server_reset_query= _always =3D 1
ignore_startup_parameters =3D extra_float_digits =C2=A0// = I have added this also or can I add these options too in the following line= =C2=A0?
;; ignore_startup_parameters =3D extra_float_digits, options, s= tatement_timeout, idle_in_transaction_session_timeout =C2=A0// doubt option= s supported in latest versions ?

max_client_conn =3D 5000 =C2=A0 // = can I give this much high value ?
default_pool_size =3D 20
min_pool_s= ize =3D 10
reserve_pool_size =3D 10
reserve_pool_timeout =3D 5
max= _db_connections =3D 100
max_user_connections =3D 30
server_lifetime = =3D 3600
server_idle_timeout =3D 600 // is this a low value or need to b= e =C2=A0increased ?
[root@pgbouncer ~]#



The config params= of =C2=A0NodeJS application which uses nodejs connection pooling in= =C2=A0code as follows

the Node JS application using the following = =C2=A0nodejs pooling configurations for the application level

cat= app_10072025/config/pg-pool-config.js
.......
const poolOptio= ns =3D {
=C2=A0 =C2=A0 max: 10,
=C2=A0 =C2=A0 min: 2,
=C2=A0 =C2= =A0 idleTimeoutMillis: 600000, =C2=A0 //Idle for 5Min
=C2=A0 =C2=A0 conn= ectionTimeoutMillis: 10000, =C2=A0//Reconnect 10sec
=C2=A0 =C2=A0 statem= ent_timeout: 60000, =C2=A0 =C2=A0//Query executiion 1 min
=C2=A0 =C2=A0 = acquire: 20000,
=C2=A0 =C2=A0 maxUses: 1000 //reconnect after 1000 queri= es
};


const pools =3D {
=C2=A0 =C2=A0
=C2=A0 =C2=A0 tra= nsaction_db: new Pool({
=C2=A0 =C2=A0 =C2=A0 =C2=A0 connectionString: `p= ostgresql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME_TRANS= ACTION_DB}`,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ...poolOptions,
=C2=A0 =C2= =A0 }),
};

..................................

Any =C2=A0hi= nts=C2=A0 =C2=A0and suggestions in the config params are most welcome.=C2= =A0

Thank you,
Krishane
--000000000000f6f2f8063a06b6cd--