public inbox for [email protected]
help / color / mirror / Atom feedFrom: KK CHN <[email protected]>
To: Laurenz Albe <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: Pgbouncer and Node JS application Query read timeout error
Date: Fri, 10 Apr 2026 12:37:22 +0530
Message-ID: <CAKgGyB_zeOcCu+U=_=1OW_iJTcBweX1crEJQfxT-dN-b1_0JdQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAKgGyB_OmPnsgrr7YWOY=w8VDH7pN2hCt4Tsd1nJy=-xM=64eA@mail.gmail.com>
<[email protected]>
On Wed, Apr 8, 2026 at 11:58 AM Laurenz Albe <[email protected]>
wrote:
> On Wed, 2026-04-08 at 10:51 +0530, KK CHN wrote:
> > List, I am using pgbouncer(PgBouncer 1.23.1 RHEL 9.4) along with
> Postgres16(RHEL 9.4)
> > for connection pooling.
> >
> > Running a nodejs application which is throwing some errors related to
> query timeout
> > which the development team suspect after pgbouncer deployment
> this behaviour appears,
> > but not sure
> >
> > The error which is thrown from the nodejs logs as follows..
> >
> > [image showing an error "Query read timeout"]
> >
> > Is this due to pgbouncer config issues or nodejs pool config issues
> ?
> >
> > for reference here the pgbouncer config params and node js params at
> present.
> >
> > pgbouncer.ini
> >
> > [...]
> > [pgbouncer]
> > pool_mode = transaction
> > default_pool_size = 50
> > min_pool_size = 30
> > reserve_pool_size = 10
> > reserve_pool_timeout = 5
> > max_db_connections = 130
> > max_user_connections = 180
> > server_lifetime = 3600
> > server_idle_timeout = 600
> > [...]
>
>
> The only way I can imagine that pgBouncer is leading to timeouts on the
> client 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
> that no
> connection has to wait.
>
Configuring Node.js pools smaller ? I couldn't get the logic here why
advised to reduce the pool size ?
Increasing pool size more than 10 adversely affects the connection
establishment from Node.js application ? Since DB is having
Pgbouncer infront and default_pool_size = 50 there , don't we have the
freedom to increase node.js application pool size and it will help the
query timeout ? or any hidden facts involved could you elaborate ..
Thank you,
Krishane
>
> Yours,
> Laurenz Albe
>
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Pgbouncer and Node JS application Query read timeout error
In-Reply-To: <CAKgGyB_zeOcCu+U=_=1OW_iJTcBweX1crEJQfxT-dN-b1_0JdQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox