From: hubert depesz lubaczewski <depesz@depesz.com>
To: Walters Che Ndoh <chendohw@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: killing idle_connections
Date: Tue, 1 Dec 2020 14:38:45 +0100
Message-ID: <20201201133845.GC22431@depesz.com> (raw)
In-Reply-To: <CAJ=HdqKPSJNJwit3LwXjNE04_uZwRhstm5e0-xMF5pHNXqEHjA@mail.gmail.com>
References: <CAJ=HdqKPSJNJwit3LwXjNE04_uZwRhstm5e0-xMF5pHNXqEHjA@mail.gmail.com>
On Mon, Nov 30, 2020 at 07:49:39PM -0700, Walters Che Ndoh wrote:
> I have two DB's in prod
> - DB 1 has pg12 and pgbouncer for connection pooling
> - DB 2 has pg10 and F5 for connection pooling
>
> Both DB's have a max connection of 500.
> During pick hours i always run out of connections, even though i have 3
> superuser reserved, my connections still go beyond 500.
What is your pool_mode in pgbouncer?
If it's "session" - then it is the problem, and you should consider
reading https://www.depesz.com/2012/12/02/what-is-the-point-of-bouncing/
Please note that not all applications will work OK with transaction
pooling, but if they don't then (for me) it's a sign that they should
get fixed.
depesz
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: pgsql-admin@postgresql.org
Cc: depesz@depesz.com, chendohw@gmail.com
Subject: Re: killing idle_connections
In-Reply-To: <20201201133845.GC22431@depesz.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox