Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jK28V-0006dI-Ux for pgsql-general@arkaria.postgresql.org; Thu, 02 Apr 2020 15:52:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jK28T-0007GH-HI for pgsql-general@arkaria.postgresql.org; Thu, 02 Apr 2020 15:52:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jK28T-0007BN-8y for pgsql-general@lists.postgresql.org; Thu, 02 Apr 2020 15:52:05 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jK28M-00019O-Rr for pgsql-general@postgresql.org; Thu, 02 Apr 2020 15:52:04 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 032Fpt1P017878; Thu, 2 Apr 2020 11:51:55 -0400 From: Tom Lane To: "Abraham, Danny" cc: "pgsql-general@postgresql.org" Subject: Re: too many clients already In-reply-to: References: Comments: In-reply-to "Abraham, Danny" message dated "Thu, 02 Apr 2020 15:06:03 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <17876.1585842715.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 02 Apr 2020 11:51:55 -0400 Message-ID: <17877.1585842715@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "Abraham, Danny" writes: > Running on a big and stressed AIX platform and receiving lots of "CDTFAT= AL: sorry, too many clients already" > and transient difficulty to log in. > Happens on all PG versions (Tested 9.5,10.4,11.5) > Big installation: max_connections is 1200, shared_buffers is 2GB = > But .. select count(*) from pg_stat_activity is only 66. I'd be suspicious that there are a lot of clients stuck in connection startup (likely the authentication phase); those connections aren't going to show in pg_stat_activity until they finish connecting. The "ps" suggestion Adrian gave you would not show them either, because they're not going to say "idle". Enabling log_connections and watching the postmaster log would help prove or disprove that theory. regards, tom lane