Re: Database logins taking longer and longer, showing up as "authentication" in ps(1)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Adam Sjøgren <asjo(at)koldfront(dot)dk>, pgsql-general(at)postgresql(dot)org
Subject: Re: Database logins taking longer and longer, showing up as "authentication" in ps(1)
Date: 2020-08-18 14:54:09
Message-ID: 1204950.1597762449@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Stephen Frost <sfrost(at)snowman(dot)net> writes:
> * Adam Sjøgren (asjo(at)koldfront(dot)dk) wrote:
>> Sometimes new database logins slow down, from usually taking <0.05s to
>> taking minutes. This is for psql as a normal user using Kerberos, for
>> psql as the postgres superuser, for the web-application logging into the
>> database, for everything.

> When in doubt, blame DNS.

The trouble with outside-the-database explanations is that it's not
clear why stopping the worker processes would make such issues go away.

I think looking into pg_stat_activity and pg_locks might be interesting,
although it's possible the delay is before the new session has made
any entries there.

Also, obtaining stack traces from a few of the stuck processes would
likely be quite informative.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adam Sjøgren 2020-08-18 15:00:05 Re: Database logins taking longer and longer, showing up as "authentication" in ps(1)
Previous Message Adam Sjøgren 2020-08-18 14:47:26 Re: Database logins taking longer and longer, showing up as "authentication" in ps(1)