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 1mpexj-00031J-MO for pgsql-general@arkaria.postgresql.org; Tue, 23 Nov 2021 23:12:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mpexi-000451-6p for pgsql-general@arkaria.postgresql.org; Tue, 23 Nov 2021 23:12:30 +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 1mpexg-00044r-Mj for pgsql-general@lists.postgresql.org; Tue, 23 Nov 2021 23:12:29 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mpexb-0007b7-0E for pgsql-general@postgresql.org; Tue, 23 Nov 2021 23:12:28 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id F20DB5C00DA; Tue, 23 Nov 2021 18:12:19 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 23 Nov 2021 18:12:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=Y hzhTSQ54GOKQIpq8IsWeYc3vGN8AN9fQPizbEcO/j4=; b=gheAApGHdmbLKR0mv n4P6nyd6wdAUxHXrCJQbX0LsfAqqPGwMHvvVbZp0YOobH174Phvh1VjFMiZSTbnC hRrdSSj04ffEvOkC6mvDuW3d22JodBwrWiUx9aB1YSY0FS9YZVJecsa42nihawzm S9vBIUaQ9hxJnv28bk9n6veUkymDmGwN/+Q48UfuTb4L4m4pqJQJzerYvQIduV/f sFbw2w5SlZAHOdgrrQemduIKwSAyskFaHN0t3w8OCjfOGMALEVW/+6oC85CE/Kxj UaYLY1cc+FHIFEchNas1LOZEOMH5PmAhJnZgOaHwUVIU4ebyKVZ68k1o8RtwDerc KIX+w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=fm1; bh=YhzhTSQ54GOKQIpq8IsWeYc3vGN8AN9fQPizbEcO/ j4=; b=eVobO1bA6hzy65PYF8dHYSE4a+FH9RdPqMoUI3x4NnZhxOpuwY/T32X6d R80u2BoXyyrToMma7zFhhtCf4xi2Fk5MRm6/wynLvvkygVjmepIToxUA1gPyaE8Q QqVNDESz6/LfCoispO7urL9Rt6v+FkO/KOzHTKAQB8DR5cxo+dJiOo8XoBXmJ5tX g3JlA+5W2JaorCzwhRDjXAOGz0KsDGCUR8TDrUC5Q0rEkiRpi6Wk5KD4JAJZHx/c d5m4fy251LJ2EXY9vV+J6AV+rFXQZRv0sevxGLWvoyh/od/T+UOlTfYqMAc1qJfi KsDUMJGjNVt7CR7yLKzY9N0Q42sIQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrgeejgddtjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuggftrfgrthhtvghrnhepvedvkeeihfduhffhtdekleegffduiefgteejgeffgffh teefleeludfgleelgeevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 23 Nov 2021 18:12:19 -0500 (EST) Message-ID: <29859e1f-d4ad-6c1a-b6f3-0b97e2f8d55f@aklaver.com> Date: Tue, 23 Nov 2021 15:12:18 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: Max connections reached without max connections reached Content-Language: en-US To: James Sewell , Tom Lane Cc: pgsql-general References: <4176160.1637681607@sss.pgh.pa.us> From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11/23/21 14:56, James Sewell wrote: > Sorry, I could have been clearer - pg_stat_activity is what I'm looking > at - I'm recording connection info from here every 15 seconds (from a > superuser account so I don't get locked out). It never peaks above 300 > (in fact when the incident happens no new connections can come in so it > falls to around 100) - yet I'm seeing the log lines claim that I'm still > hitting 597 (600 - 3 reserved). What is the query you are using against pg_stat_activity? > > James > -- Adrian Klaver adrian.klaver@aklaver.com