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 1oVDzD-0007RA-3r for pgsql-admin@arkaria.postgresql.org; Mon, 05 Sep 2022 15:26: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 1oVDzB-0006SA-UH for pgsql-admin@arkaria.postgresql.org; Mon, 05 Sep 2022 15:26:05 +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 1oVDzB-0006S1-HH for pgsql-admin@lists.postgresql.org; Mon, 05 Sep 2022 15:26:05 +0000 Received: from mail-qk1-x729.google.com ([2607:f8b0:4864:20::729]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oVDz4-0002zg-ND for pgsql-admin@lists.postgresql.org; Mon, 05 Sep 2022 15:26:05 +0000 Received: by mail-qk1-x729.google.com with SMTP id a15so6488223qko.4 for ; Mon, 05 Sep 2022 08:25:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date; bh=SNS2Q65kRop/QW/P2Htx4f8v1/hOrvmtxsEKcjzwCV4=; b=Xq+q6YytdxswB6BIpUuXH0Y10tI82TaRypEoDiYVnafG9T5TIAsiHpFt3hm4viFGdU XqfQ/5p7FTnrPGH96hGBhkHCdh0++I09Hmjc7XyJ9UsaXVD6cybRXFFSHYvDj8j3tC1u yaV8XTAPrCChGZA8rFERufsaIlyyHhR3txHTjk46iMy4ZNuD4NsjcszshilpRTA7qA8q R86wVctbM2aTIiNyODrDbZSOC9N4K5cdC+2vOjELns1Lx1/ahoeCl85iWX5IRZoLkGoJ c0RnnUZCRllacAyocyeshiXRofFCpcVSqGSzG4JGafOlprNwh1ddWjJgGzRgG+uaGqHz NTFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date; bh=SNS2Q65kRop/QW/P2Htx4f8v1/hOrvmtxsEKcjzwCV4=; b=e1CBDEmh/MUpwqes3g3asyALjdIJNdYKXEIi9hsEVYw/jm1k2L3Z8fcHa6xLpaiiVQ s/52GfOse4hX4UxWWEsFj3WcPSsSXgkaS6a6hwjg/9TBslnPI1ur2/kMlKyWbmZh8dtL 8Yu/WvB59uoy58IFVGUHoXOVyHIVz1e2cmk6y1kmoGbiPASTDjRZSwdzJTVyjAtKAOZ4 EqRR7KJQkijXBC0izMW75RpbJ/jdvlm1aQs4JlFH9IodVe9fGnEymEix2+/n1L+x3Tt7 Tgm16QQwYGiLG/2/kxqhKrxgEcKZVWpGscKRNd+m/n+MB6vTtE4uvnvWvig9nBUXlIBF Zb9Q== X-Gm-Message-State: ACgBeo2EL89DToqG4v2LGonqE5p5wUFOq12QJ4g94KMHS0FmDdUQAEjc lCDXb6KCq+df72cx1rMHO59At4R1C8oipn1U X-Google-Smtp-Source: AA6agR4US5fu557fMTzjuWwC6VI+K4jI+U3gGxTNx+I57vD/446nc/S7TC8uNpHaDn9OLo+a/p0DOg== X-Received: by 2002:a05:620a:4087:b0:6bc:5e42:fee3 with SMTP id f7-20020a05620a408700b006bc5e42fee3mr32218502qko.551.1662391556719; Mon, 05 Sep 2022 08:25:56 -0700 (PDT) Received: from [192.168.2.100] (pool-72-79-30-4.nwrknj.east.verizon.net. [72.79.30.4]) by smtp.gmail.com with ESMTPSA id o1-20020ac85541000000b00339163a06fcsm7340460qtr.6.2022.09.05.08.25.56 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Sep 2022 08:25:56 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------EuZqMrArjeE0UWBUvLVH7kXA" Message-ID: Date: Mon, 5 Sep 2022 11:25:55 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: PostgreSQL Out of Memory To: pgsql-admin@lists.postgresql.org References: Content-Language: en-US From: Mladen Gogala In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------EuZqMrArjeE0UWBUvLVH7kXA Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 9/5/22 07:54, liam saffioti wrote: > Hi Teams, > > FATAL:  terminating background worker "parallel worker" due to > administrator command > FATAL:  terminating background worker "parallel worker" due to > administrator command > FATAL:  terminating background worker "parallel worker" due to > administrator command > FATAL:  out of memory > FATAL:  out of memory > ... You are allowing over-committing memory, which in turn activates OOMK (Out of Memory Killer) when the memory runs out. You have to restrict the number of connections or parameters like work_mem and hash_mem_multiplier. There is also a good article on Squishy Data: https://www.crunchydata.com/blog/deep-postgresql-thoughts-the-linux-assassin Basically, you should start with vm.overcommit_memory = 2 -- Mladen Gogala Database Consultant Tel: (347) 321-1217 https://dbwhisperer.wordpress.com --------------EuZqMrArjeE0UWBUvLVH7kXA Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 9/5/22 07:54, liam saffioti wrote:
Hi Teams,

FATAL:  terminating background worker "parallel worker" due to administrator command
FATAL:  terminating background worker "parallel worker" due to administrator command
FATAL:  terminating background worker "parallel worker" due to administrator command
FATAL:  out of memory
FATAL:  out of memory
...

You are allowing over-committing memory, which in turn activates OOMK (Out of Memory Killer) when the memory runs out. You have to restrict the number of connections or parameters like work_mem and hash_mem_multiplier. There is also a good article on Squishy Data:

https://www.crunchydata.com/blog/deep-postgresql-thoughts-the-linux-assassin

Basically, you should start with vm.overcommit_memory = 2

-- 
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com
--------------EuZqMrArjeE0UWBUvLVH7kXA--