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 1lBlR6-0001vT-OA for pgsql-general@arkaria.postgresql.org; Mon, 15 Feb 2021 21:29:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lBlR5-0005pR-Ln for pgsql-general@arkaria.postgresql.org; Mon, 15 Feb 2021 21:29:39 +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 1lBlR4-0005pA-MM for pgsql-general@lists.postgresql.org; Mon, 15 Feb 2021 21:29:39 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lBlQz-0001rN-SK for pgsql-general@lists.postgresql.org; Mon, 15 Feb 2021 21:29:38 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id B6B0F5C019F; Mon, 15 Feb 2021 16:29:30 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 15 Feb 2021 16:29:30 -0500 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=m ikACwmtUgElCB2GkdqTEZgT6Ub6WhV7kq66ecqoQXw=; b=kIkLz5wtOQfBHGYyf fP8IvQUMW3jhzYKwvlf7EnFV06MbjrBg2JudUqp0KMHUJkP0JSsBe8olTz3KE/t7 CwKh3cLgnTfzLaLVmGIRigNUNaPm69BLri4ySktQXyTGPggGET1krhkK1Fr1mdhl pmJlx/J1JxE4VuzjeYxvh53PI65fZ/BIG9oeqfyatxtFlQ3Qo3zfF7CbThrl+BS9 Q5IRAzjfBaGxVatuucNjmSk/aPcrfCeGpZ0GJI7hG/FTFKpX3oLccMs3FyWWa7ha pjv/WDxAm3PksZEvO9JM9ZWAnKSLTVo5Be5VCXk55uDdTVPYaTr3YTNXXHAXcBR+ 0miSg== 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=mikACwmtUgElCB2GkdqTEZgT6Ub6WhV7kq66ecqoQ Xw=; b=iszRbS79S0J4mbZ1iqiPHHxV4ifC8ttEl3iKHgqt0UM/rjSy4Bg16HnXj /8NTZxcmnAdjIj7rVe09FO5q5FumTQowf2UAa9DCQRN3eDkDU/6CuVDx3FWvUDLb kxFHE1qcjZsb47A7BactZHXrDNjYv34lJJj4gryidwFzuPg1cG0HTckBy6ITswXu fkxn4P/igE2bvbFkqwLLsz/GSDEAQdY5VOb5YBy0RwoEmkGR0Zgifr0vhVVh8D+U rlCLR5STV78SbvZ8Ue6P4Oig0GzYgVg24V/Ma6uQ+ixt5Bt6tmL2J1KmuOh9ZIZc uWFQerXku9OGIAqN1mm46MsmiznmA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrieekgddugeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtke ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepveevfeevfe eugeffkeekhfegieeufffgteeujedvgffhueejjefhkeejleegtdegnecukfhppeeljedr uddufedrvddujedrvdejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: from [192.168.1.4] (97-113-217-27.tukw.qwest.net [97.113.217.27]) by mail.messagingengine.com (Postfix) with ESMTPA id D74B2108005F; Mon, 15 Feb 2021 16:29:29 -0500 (EST) Subject: Re: checkpointer and other server processes crashing To: Joe Abbate , pgsql-general@lists.postgresql.org References: From: Adrian Klaver Message-ID: Date: Mon, 15 Feb 2021 13:29:28 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2/15/21 1:15 PM, Joe Abbate wrote: > Hello, > > We've been experiencing PG server process crashes about every other week > on a mostly read only website (except for a single insert/update on page > access).  Typical log entries look like > > LOG:  checkpointer process (PID 11200) was terminated by signal 9: Killed > LOG:  terminating any other active server processes Have you looked at the system logs to see if the OOM killer is involved? > > Other than the checkpointer, the server process that was terminated was > either doing a "BEGIN READ WRITE", a "COMMIT" or executing a specific > SELECT. > > The database is always recovered within a second and everything else > appears to resume normally.  We're not certain about what triggers this, > but in several instances the web logs show an external bot issuing > multiple HEAD requests on what is logically a single page.  The web > server logs show "broken pipe" and EOF errors, and PG logs sometimes > shows a number of "incomplete startup packet" messages before the > termination message. > > This started roughly when the site was migrated to Go, whose web > "processes" run as "goroutines", scheduled by Go's runtime (previously > the site used Python and Gunicorn to serve the pages, which probably > isolated the PG processes from a barrage of nearly simultaneous requests). > > As I understand it, the PG server processes doing a SELECT are spawned > as children of the Go process, so presumably if a "goroutine" dies, the > associated PG process would die too, but I'm not sure I grasp why that > would cause a recovery/restart.  I also don't understand where the > checkpointer process fits in the picture (and what would cause it to die). > > For the record, this is on PG 11.9 running on Debian. > > TIA, > > Joe > > -- Adrian Klaver adrian.klaver@aklaver.com