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 1jK1eD-0005bY-H2 for pgsql-general@arkaria.postgresql.org; Thu, 02 Apr 2020 15:20:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jK1eC-00029W-Cn for pgsql-general@arkaria.postgresql.org; Thu, 02 Apr 2020 15:20:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jK1eA-00029E-PP for pgsql-general@lists.postgresql.org; Thu, 02 Apr 2020 15:20:48 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jK1e6-00041c-Ac for pgsql-general@postgresql.org; Thu, 02 Apr 2020 15:20:46 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id EFF5A5C02A8; Thu, 2 Apr 2020 11:20:39 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 02 Apr 2020 11:20:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=y z91p9/GOZ+IvwBFoGsf9hab5EwGQewhBUJaE0Y/WIo=; b=pfMkU4AqfDxMtAqC8 9n2bGmREZ2cu2eznLNAbV4s1HJRQ5xgPdkmIMhXPTqOtT+5C7LbBGCykv456OFN4 WOX5z1EjBZPktxEvOY7MZqHFp9GOl0R7S/OqjDXKeY+Tl642fnh27pXTzCY6PGv2 xPf2jcLOIDLCZRBF2XrGcnyviK95HdQJC58IXWFUmJ3jR908wb/0PwXQAEuN90v9 bVQcXD1IpISb4HMjIJqWMF8NfIBvP81SAqScZVkJoKbRvlcgmlvqyGBiLUWcybcT +b9yKtG7qsTP9xYL1D+e8bJzLZyzyvRnouC2r9FnoP5fkQ//UMzDhlRN61iA5g+h 2dp6A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=yz91p9/GOZ+IvwBFoGsf9hab5EwGQewhBUJaE0Y/W Io=; b=gDlEVobsjlktwdYAJNOUiBDLjId1Kj98Qjj3Luswaeofa0qR2SGjoI86e JwVpGEVbEyY/sbrGuVIp1bMCU2EN1Wu03D896KgTDO0dJb8aUQcP90qO3FPSaTmt UE0Z4WYTc4gXVzwKHYW7mlPPvTjwC6pMzuKRPiXS9UGI0vOtUL3e+pRmUFbnCmtw WvRWadxfjArq5lOyEfxEhTO44wlHSGLc3PRgoqY9IsZ5PVvVXG44p/TPA8RnsNFC oGb+Cwccdj68jURttn731UksNStb39hx/UTqQx8N+g/K1VJhThwL4UyeQDGR3isu DjW+r5VLbiGhp59XmeF1/nLgGhW6Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrtdeggdekvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecukfhppeejhedrudejvddrledtrdelvdenucevlhhushhtvghrufhiiigvpedtnecu rfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvg hrrdgtohhm X-ME-Proxy: Received: from [192.168.1.10] (75-172-90-92.tukw.qwest.net [75.172.90.92]) by mail.messagingengine.com (Postfix) with ESMTPA id 5375B3280059; Thu, 2 Apr 2020 11:20:39 -0400 (EDT) Subject: Re: too many clients already To: "Abraham, Danny" , "pgsql-general@postgresql.org" References: From: Adrian Klaver Message-ID: Date: Thu, 2 Apr 2020 08:20:38 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 4/2/20 8:06 AM, Abraham, Danny wrote: > Hi, > > Will appreciate a hint here. > > Running on a big and stressed AIX platform and receiving lots of "CDTFATAL: 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. On the chance pg_stat_activity is lying to you what does: ps ax | grep post show for backends? For example: ps ax | grep post 1217 ? Ss 0:00 /usr/lib/postfix/bin//master -w 1233 ? S 0:00 /usr/local/pgsql12/bin/postmaster -D /usr/local/pgsql12/data 1253 ? Ss 0:00 postgres: logger 1277 ? Ss 0:00 postgres: checkpointer 1278 ? Ss 0:00 postgres: background writer 1279 ? Ss 0:00 postgres: walwriter 1280 ? Ss 0:00 postgres: autovacuum launcher 1281 ? Ss 0:00 postgres: stats collector 1282 ? Ss 0:00 postgres: logical replication launcher *4693 ? Ss 0:00 postgres: aklaver task_manager [local] idle *4907 ? Ss 0:00 postgres: aklaver production [local] idle > > Thanks > > Danny > > -- Adrian Klaver adrian.klaver@aklaver.com