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.96) (envelope-from ) id 1wAMOV-002J52-0Y for pgsql-general@arkaria.postgresql.org; Wed, 08 Apr 2026 06:28:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wAMOT-005HHJ-1m for pgsql-general@arkaria.postgresql.org; Wed, 08 Apr 2026 06:28:05 +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.96) (envelope-from ) id 1wAMOT-005HHB-0b for pgsql-general@lists.postgresql.org; Wed, 08 Apr 2026 06:28:05 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wAMOR-00000001AnT-0oMR for pgsql-general@postgresql.org; Wed, 08 Apr 2026 06:28:04 +0000 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-43b87970468so4491576f8f.3 for ; Tue, 07 Apr 2026 23:28:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1775629681; x=1776234481; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=db1FLyUI+He90taGmrhfOkO8A+GnzmeUDp8FmMM7EOA=; b=KxUeqZP3M73iG5Efs0s9RQ14LgqM/X0bU0+RdX3QtCyEZuy5umzNM+yJoXc25pPjhB R7wzM1GFTiSzetp7EpQ8QoOo/+3Gn1zHVRiomaoUeaFI/fsNcaNNDCqIHZX801zSOelJ tU8oKdE5jZfzuSjuTe6A8TlrIrgWBhUALdM8VE3aRp4ED+rVvs20DD5c1FxPfmf/8HE9 XKHVMHDECnluCwBDrHZufXL0FBpw5HsoO/cqKE1pVKUnqUC8LYZ6ocQcwhxCHNri6hCk Snmp+EFOy4Zq2HQySY1R42Jknd5HoNzmQ2tNqB2/JTv0X96Z989XT0pjyuRsJoVAJODs X+vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775629681; x=1776234481; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=db1FLyUI+He90taGmrhfOkO8A+GnzmeUDp8FmMM7EOA=; b=HDRQ9l9Sk3/8lQWi4Jrzrx7o7tvcyZ1gUaJCx9O/swLNsShQ2I7YJVSkPffVKLLmon +RD3medkPG5gteDcHMm8hMCRxLmKe+yA7/bR8ut896FlCGNNyXQMq4CxmrVbI9/jnbs+ X/W/kBirQzWo6aXw1BUo8OTbeTHR9KkhlHTGUBjXKX6CRDbO3r9TgjAMjVFIJP1OIWv/ gto0YN2VSpkgR/WDPhVxKKGjk7a2olZ4Y/ivIbWqbBywW7WruFrgyBYvFT2Y/F57rWIf hiZYYZ8uvsW2MVFuX0B9yNReT07vsGmqnhgHz58vJBM9N8U4RcmF2ZBglFPCKiXS5vRq lhUQ== X-Forwarded-Encrypted: i=1; AJvYcCVPN2eRWihQngW/+ZEqXP2MogQB5TPk2W5VjvsiOmHagV1trKU9JBYlT+PD5JcnKM0WXl4A+hilkulSP2+s@postgresql.org X-Gm-Message-State: AOJu0YyX8sO4QISfMopRqFiv1HmtatBkWrHLQ4Kh57jUOLxi42gThLq6 oDu9YQD1XGeD21uiepPeIqLi/RpqHh5MTo9CbLXRkIOorFNmTz2qiOQDQ2ETJpjt4mY= X-Gm-Gg: AeBDieubXAlASzQKfRsWUD0Wliw8AOTZ2AzoyD2fmPeARow9J0/2RenuuO/hM41ddVe 837tnc8GcdG57z/MIsJeQ943Jele+9SqW0qPs7vNHd8oJewMEleCdAOK+Ad0YBZtJ3rkvxZL1HZ 1jrldf5redGX+rL/SFoinhM0UuDCd5HmDR3ItU4FG14BHuvbkqwUeeHWH+nnVwujQcD/7T/Ax0X JsgzrHU9883t8eKC8TRu+dEwH2CTMRP7wyuqXa0iix7qSH8jkovXo9B0VuoGgOL3zctG865OQjy GG/EL4wfpS6KmJjzveFfHqbRf7JD+0A3UvX0exe1wjzpPYVGlhXpWwbNbtyPKeQcdXGKzHDa8VM q0SaF8YO/7DBGL2AbLKDbBgnmAAmHB7CyscqJqJXUveXopBAkmt63jgJSWu/ewyl5KY0TP8WHHF gBm8+DmivbUAo2eOfe2KNfyoMQEMwZji9EpKYkCAxzYv3nPraIUA== X-Received: by 2002:a5d:584b:0:b0:439:b791:f920 with SMTP id ffacd0b85a97d-43d2927fccdmr29138550f8f.17.1775629680984; Tue, 07 Apr 2026 23:28:00 -0700 (PDT) Received: from laurenz.albe-K4N0CV00F97414D ([41.66.98.169]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43d1e4d2738sm57203643f8f.24.2026.04.07.23.28.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Apr 2026 23:28:00 -0700 (PDT) Message-ID: <6b3cf69fa569d263a593cc2afe74dc35d29754eb.camel@cybertec.at> Subject: Re: Pgbouncer and Node JS application Query read timeout error From: Laurenz Albe To: KK CHN , pgsql-general Date: Wed, 08 Apr 2026 08:27:59 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.3 (3.58.3-1.fc43) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2026-04-08 at 10:51 +0530, KK CHN wrote: > List,=C2=A0I am using pgbouncer(PgBouncer 1.23.1 RHEL 9.4) along with=C2= =A0 Postgres16(RHEL 9.4) > for connection pooling.=C2=A0 =C2=A0 >=20 > Running a nodejs application which is throwing some errors=C2=A0 related = to query timeout > which the development team suspect after pgbouncer deployment this=C2=A0b= ehaviour appears, > but not sure=C2=A0 >=20 > The error which is thrown from=C2=A0 the nodejs logs as follows..=C2=A0 >=20 > [image showing an error "Query read timeout"] > > Is this due to=C2=A0 =C2=A0pgbouncer config issues or=C2=A0 =C2=A0nodejs= =C2=A0 pool config issues ? >=20 > for=C2=A0 reference here the pgbouncer=C2=A0 config params and=C2=A0 node= js=C2=A0 params at present. >=20 > pgbouncer.ini >=20 > [...] > [pgbouncer] > pool_mode =3D transaction > default_pool_size =3D 50 > min_pool_size =3D 30 > reserve_pool_size =3D 10 > reserve_pool_timeout =3D 5 > max_db_connections =3D 130 > max_user_connections =3D 180 > server_lifetime =3D 3600 > server_idle_timeout =3D 600 > [...] The only way I can imagine that pgBouncer is leading to timeouts on the cli= ent side is if client sessions are waiting, because all connections are in use. You can run SHOW POOLS in the pgBouncer console to see if there are any "cl= _waiting". If that is the case, you should configure the Node.js pools smaller, so tha= t no connection has to wait. Yours, Laurenz Albe