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 1pbo4T-0005DI-3V for pgsql-general@arkaria.postgresql.org; Mon, 13 Mar 2023 19:43:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pbo4R-00048S-0k for pgsql-general@arkaria.postgresql.org; Mon, 13 Mar 2023 19:42:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pbo4Q-00048D-9b for pgsql-general@lists.postgresql.org; Mon, 13 Mar 2023 19:42:58 +0000 Received: from mail-qt1-x831.google.com ([2607:f8b0:4864:20::831]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pbo4M-0008Fk-O9 for pgsql-general@lists.postgresql.org; Mon, 13 Mar 2023 19:42:57 +0000 Received: by mail-qt1-x831.google.com with SMTP id r5so14478648qtp.4 for ; Mon, 13 Mar 2023 12:42:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joeconway.com; s=google; t=1678736574; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=UcrPNOoq6BOhd+PYZ26qu0z1lx44wwetBPOs2jWpydk=; b=dnci69bN2yZ43JQw69MqSsngq68KHtzZdsw9fH4wsp4G4/BfyZVLeDQjE+fKp5qqOF Heyk8Qmmnz9pQ0MLbYHrKEqWeNE1D80Ye6uib1WJQ7ep+osirVp2X0ZniSFLnBsHIWXL JIQI/XbZWsypSwFYHtkdaQ7aHGA+cmum6Xn3micLhEf5NI5I+NYtplkC6wlubLAk6zRi TAwrBQ7lbDDIlTB/4s9Q1xVgGGbsNalxidf6a7XLDc9duQf+sm/lLmIw0lSYF1ROQkbb YzJOQzhuuG/KU33+73LIZ8S+V8wSp9oalJVazNX47FTPlrAw73C5Z2nthg7ZCEdWvwyR zb1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678736574; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UcrPNOoq6BOhd+PYZ26qu0z1lx44wwetBPOs2jWpydk=; b=ya7I8GMHwtY4xYw2bE3LuaY0V19aayMYFtVwhpUVmjbJXR/kET4gUrfY3buE1xxwpX SddVCma6DFK93pc1AoO/W9RcrRhl5zZpgleWYTNnPDbZL37YNXvS1kZa1BjX03hjGf+m wuz3tiPRypTz0V8tmzaFMI5Rt+8AkaNZADysyghE9OqvbXfZdJAj9Aaf3YA5QicHPqy4 txOkwCwXn7kx60pA2NMo2D7gKmCV3omY38ogSPyBhcWevNUTsD4UVjPDAieP7X8t8sUY /I9OyYxhNGZa68rwcmWhcSeW9ILibN5my2cCTnqg5vtCMDZey2+eDQ83yVng7kyvzvrf mOZA== X-Gm-Message-State: AO0yUKWNVAafLnP0P/gIla994RAbMbdFpNfm932686T4dupYtkh2L5Di B75TYn+fFBZVHSLgOaRC/KJFvw== X-Google-Smtp-Source: AK7set/CIDEeceyzof5T1ZfTpib7IgMv96+Fymo6Zan+eETqR3+cec5uXXj40VmcHMF3jne/2BQI9Q== X-Received: by 2002:ac8:5cc5:0:b0:3bf:c849:4971 with SMTP id s5-20020ac85cc5000000b003bfc8494971mr56408097qta.62.1678736573637; Mon, 13 Mar 2023 12:42:53 -0700 (PDT) Received: from [192.168.4.41] (162-239-31-113.lightspeed.dybhfl.sbcglobal.net. [162.239.31.113]) by smtp.gmail.com with ESMTPSA id j188-20020a3787c5000000b0074382b756c2sm330730qkd.14.2023.03.13.12.42.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Mar 2023 12:42:53 -0700 (PDT) Message-ID: Date: Mon, 13 Mar 2023 15:42:52 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US To: Israel Brewster Cc: "Peter J. Holzer" , pgsql-general@lists.postgresql.org References: <20230313174301.23n6crb5dpttozup@hjp.at> <03239776-b0c6-94a8-7bb3-a1af363d745f@joeconway.com> <9616AB47-E78B-49FD-81AE-41015E13AADC@alaska.edu> <3E19F901-6C7D-44C1-BBFE-11F78F9EE38C@alaska.edu> From: Joe Conway Subject: Re: Properly handle OOM death? In-Reply-To: <3E19F901-6C7D-44C1-BBFE-11F78F9EE38C@alaska.edu> 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 3/13/23 15:18, Israel Brewster wrote: > root@novarupta:~# cat /sys/fs/cgroup/system.slice/system-postgresql.slice/postgresql@13-main.service/memory.max > max > root@novarupta:~# cat /sys/fs/cgroup/system.slice/system-postgresql.slice/postgresql@13-main.service/memory.high > max > root@novarupta:~# > > which would presumably indicate that it’s a system level limit being > exceeded, rather than a postgresql specific one? Yep > The syslog specifically says "Memory cgroup out of memory”, if that means > something (this is my first exposure to cgroups, if you couldn’t > tell). I am not entirely sure, but without actually testing it I suspect that since memory.max = high (that is, the limit is whatever the host has available) the OOM kill is technically a cgroup OOM kill even though it is effectively a host level memory pressure event. Did you try setting "vm.overcommit_memory=2"? -- Joe Conway PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com