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 1oZvaI-0007Mr-3P for pgsql-general@arkaria.postgresql.org; Sun, 18 Sep 2022 14:47: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 1oZvaG-0004Oj-Eu for pgsql-general@arkaria.postgresql.org; Sun, 18 Sep 2022 14:47: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 1oZvaE-0004NY-Rj for pgsql-general@lists.postgresql.org; Sun, 18 Sep 2022 14:47:48 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oZva5-00024g-Qe for pgsql-general@postgresql.org; Sun, 18 Sep 2022 14:47:46 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id BFAD55C0114; Sun, 18 Sep 2022 10:47:33 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sun, 18 Sep 2022 10:47:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1663512453; x= 1663598853; bh=MwJVjXFy7ukv1STrXkyaoF0llWZm92BZWrCY7yb+VcQ=; b=W F6kW29E8YNg8qrEuJXeqeNiBsklpLzC/MnSM7RKf6Y/EcYZt2CtmhTHT1TnHx/W8 hZs9FCW1HeeXKIEsDLaC5UT4RLg/otYc6hDY91iFarHL0XgWyda7HB5FbQ2E7v0G qTZZ/S3rafcegOZD0d2CPK/SJBQKGfdyqTmGYmEmut+LRvLylxmVnW8/9v73ZRfa PrnuGRHuMQQA5q6AgNKaKWvbv5Li0RyZkuzNHZzc/KlLxLAOF84l4qA0zHMf9Vr9 X6EsgynrabiT1S5o5Husfl1HGidcwXilBiedBRoBNYOZMyiVnagRrkKpldSNsaiU 3C8Sb5fqdUKUBHVKzfZYg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1663512453; x= 1663598853; bh=MwJVjXFy7ukv1STrXkyaoF0llWZm92BZWrCY7yb+VcQ=; b=U ADN395pN01W0QZidN1T2vnc5KC4hRPClviozTSol6TqxZLUWFTd9UKOnmUYXTmvh GPpY6DPHH0gXwDCUR4poZG+XnCcbnEuHymkmMTUmqhACssKR8ZZkJYKOgtH9CWVJ xusOzoKCt1LAgo9eogV+gnRJ7Q5HeXP2B/N/7WNA1bi58RkS/eoydLsVfh0fGIYN pOojnY48Ck3Z2C67F4A6fYfORmh/FhTp6e+1RtdlniX5IJMjgtvzwf/wUo1SAXaq bzn1R7Rv9Meyi3HwWBSphFyM2o/4ffTtSklOXa9YZEDwTILQf64PFmLbCsNTpsBz EWtvWqVMC1nVbWGPd+oeQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedvhedgkeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhephfegveekfeelffdvgfdvfefftdeujeehheeuieff hfefiefhvdfhgfetgfdvuefgnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrgh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughr ihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 18 Sep 2022 10:47:33 -0400 (EDT) Message-ID: <620c5c95-b877-3db8-3445-936f696c376c@aklaver.com> Date: Sun, 18 Sep 2022 07:47:32 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: Mysterious performance degradation in exceptional cases Content-Language: en-US To: Matthias Apitz Cc: Postgres General References: <20220914083126.GA9@sh4-5.1blu.de> <1474a2c4-b254-e1b1-bf3c-90f41bed3528@aklaver.com> From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 9/18/22 02:30, Matthias Apitz wrote: > El día jueves, septiembre 15, 2022 a las 08:40:24a. m. -0700, Adrian Klaver escribió: > >> On 9/14/22 22:33, Matthias Apitz wrote: >>> El día miércoles, septiembre 14, 2022 a las 07:19:31a. m. -0700, Adrian Klaver escribió: >>> >>>> On 9/14/22 01:31, Matthias Apitz wrote: >> >> The 'app-server' does not answer, but does the database not answer also? >> >> Have you looked to see if the database is providing a response in a timely >> manner and if it is getting 'lost' in the 'app-server'? > > I do not "think" that the time is spent elsewhere in the 'app-server'. > to make a fact of the "thinking", I enabled the tracing of our dblayer > showing how many milliseconds have been spent between entering the dblayer and > returning the result to the application layers. This is in effect since > 36 hours now. Since September 13 the problem has not showed up anymore. > We are waiting for it... Is this with or without your every 10 sec 'ping' search program? > >> Also have you considered Tom Lane's suggestion of using auto_explain? > > I'm afraid that this would affect all other applications using the same > server. We still have other options to use. When the above tracing shows > a result, i.e. which of the high level operations of the dblayer uses > more time (more milliseconds) than normal, the next level is the detailed logging > of the ESQL/C operations (where we added time stamps which normaly this > logging does not have in its source code). You can load auto_explain per session as shown here: https://www.postgresql.org/docs/current/auto-explain.html F.4.2. Example > > Thanks > > matthias > -- Adrian Klaver adrian.klaver@aklaver.com