pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: James Sewell <james.sewell@jirotech.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Max connections reached without max connections reached
Date: Tue, 23 Nov 2021 18:14:31 -0500
Message-ID: <67613.1637709271@sss.pgh.pa.us> (raw)
In-Reply-To: <CAANVwEssH43T3qHwk46idFAAeMb4neeOxn+AXjmyQVbirU1=LA@mail.gmail.com>
References: <CAANVwEt-jwj_5axSJ5M9fOJRtW_1iXqBhsnK+Fofc09hhmsZJA@mail.gmail.com>
	<4176160.1637681607@sss.pgh.pa.us>
	<CAANVwEssH43T3qHwk46idFAAeMb4neeOxn+AXjmyQVbirU1=LA@mail.gmail.com>

James Sewell <james.sewell@jirotech.com> writes:
> If I measure from `ps  -ef | grep postgres` and look at the connections
> then I can see that with the startup connections I am hitting this limit.
> So client processes which are listed to the OS as "startup" ARE counted
> towards the 597 connections, but are NOT reported in pg_stat_activity

So I guess the question becomes why are they spending so much time in
the startup state.  That should take mere milliseconds, unless the
clients are being slow to handle the authentication exchange?

I'm also wondering a bit about whether they're being blocked on a lock,
eg. due to something taking an exclusive lock on pg_authid or pg_database.
pg_locks might be interesting to check.

			regards, tom lane





view thread (40+ messages)  latest in thread

Message-ID: <67613.1637709271@sss.pgh.pa.us>
Permalink:  ../67613.1637709271@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/67613.1637709271@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, james.sewell@jirotech.com
  Subject: Re: Max connections reached without max connections reached
  In-Reply-To: <67613.1637709271@sss.pgh.pa.us>
  References: <CAANVwEt-jwj_5axSJ5M9fOJRtW_1iXqBhsnK+Fofc09hhmsZJA@mail.gmail.com> <4176160.1637681607@sss.pgh.pa.us> <CAANVwEssH43T3qHwk46idFAAeMb4neeOxn+AXjmyQVbirU1=LA@mail.gmail.com> <67613.1637709271@sss.pgh.pa.us>

* 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