public inbox for [email protected]
help / color / mirror / Atom feedFrom: hubert depesz lubaczewski <[email protected]>
To: Chris Wilson <[email protected]>
Cc: Adrian Klaver <[email protected]>
Cc: PostgreSQL General <[email protected]>
Subject: Re: Streaming replica hangs periodically for ~ 1 second - how to diagnose/debug
Date: Fri, 22 Aug 2025 14:39:29 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAOg7f83dNTc4xmngUqTOPiVLtMsTqjdz9Sr2szfpiYtL+Sf9Tg@mail.gmail.com>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<CAOg7f83dNTc4xmngUqTOPiVLtMsTqjdz9Sr2szfpiYtL+Sf9Tg@mail.gmail.com>
On Thu, Aug 21, 2025 at 07:38:34PM +0100, Chris Wilson wrote:
> If all your queries are coming through pgBouncer, and only those hang (the
> server itself responds if you connect directly to it), then it might be
> this pgBouncer issue:
>
> https://github.com/pgbouncer/pgbouncer/issues/1054
>
> Although that issue is now "closed", because the invisible "debug" log
> message was upgraded to a warning (and I don't think that change is in any
> released version), the underlying problem still exists: pgbouncer hangs
> completely (stops forwarding packets) for a while if the PAM
> authentication queue becomes full.
>
> If you have a relatively slow PAM service (such as pam_ldap) then you can
> trigger it by opening ~100 connections to pgBouncer simultaneously (without
> waiting for previous ones to authenticate), something like this:
>
> for i in `seq 1 100`; do psql -h pgbouncer -p 6432 -U user db_name -c
> "SELECT 1" & done
Please note that during the time of problem *NOTHING* seems to be
happening in Pg. There are no messages in logs about anything.
We don't have direct access to db, so there is no sane way to check if
directly sent queries will work.
I can, of course, start shell, and run queries there, but ephemeral
nature of the problem makes it more difficult.
As for authentication - there is no ldap/pam in place. All auth is based
on certs/passowrds-in-file, and we never noticed authentication
slowdowns.
Plus - queries like 'DISCARD ALL' are not ran because someone connected…
Best regards,
depesz
view thread (27+ messages) latest in thread
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], [email protected], [email protected]
Subject: Re: Streaming replica hangs periodically for ~ 1 second - how to diagnose/debug
In-Reply-To: <[email protected]>
* 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