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 1krlqV-0007xY-BL for pgsql-admin@arkaria.postgresql.org; Tue, 22 Dec 2020 17:53:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1krlqU-00049E-2h for pgsql-admin@arkaria.postgresql.org; Tue, 22 Dec 2020 17:53:14 +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 1krlqT-000497-Rc for pgsql-admin@lists.postgresql.org; Tue, 22 Dec 2020 17:53:13 +0000 Received: from mout.perfora.net ([74.208.4.194]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1krlqR-0000rE-MW for pgsql-admin@postgresql.org; Tue, 22 Dec 2020 17:53:13 +0000 Received: from [192.168.1.165] ([72.205.30.64]) by mrelay.perfora.net (mreueus002 [74.208.5.2]) with ESMTPSA (Nemesis) id 0MUpi6-1kZ6Pn3kaa-00YCBo; Tue, 22 Dec 2020 18:53:08 +0100 Subject: Re: Error: "could not fork new process for connection: Cannot allocate memory" To: frank picabia Cc: pgsql-admin@postgresql.org References: <492638.1608564438@sss.pgh.pa.us> <574264.1608600463@sss.pgh.pa.us> From: MichaelDBA Message-ID: <95bf577e-f598-3ec5-0c2c-e2d1ca0d7f70@sqlexec.com> Date: Tue, 22 Dec 2020 12:53:05 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 PostboxApp/7.0.42 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------A87E2210CD649B0B270BB604" Content-Language: en-US X-Provags-ID: V03:K1:KPn8vTcnjBE9dG2/pqTKfMTDn6oi2L5cl9qe3iyE1iOpOMywWNI Id7bHebO2ut2XH31+mACkWMEgj4mPTJc9jCy2sd8cS0d7SWIcGyo5DsT9WWmu7zhx/en6fI H4QYatskKSUVGgJDdgHqsq44TK/pVedlnXZIo3YBUDxSdS0iKPOSj/F8q7omKNDXotxWi9v hYBwUntXvZXGQkQdZJuwQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:bBQzm9L7h9M=:Y5EzRS/CnpxYN4uu/4qX8y /SE37sa2aDPb0gdCgOR10qftTJsVJAHNsmns9DIHc1CLNUjehuy/p3S7nHVD7HrSd8Y0B8l/9 lK0YJZInuDbWiqf/HME0lOS047681RMYtocjtqAEpz18k/zwU+IS9O7bppCWpgqnBIoBR8WAi FK/41yHKnCYzTbC0vQdM1oUd+Rn9VTHWssyzoCooYwchVZVDMk+NIuQ5Ei2m8XgqzcoKyGzc6 JeWLs2kQIX96yG9YeGcBVHLGXbF4bNuxWz+IpyoFQ+/OY9nKdvyiQZFsIxoNgipjq7G0cqNar HOHKgTWglwoPHhzUZEQm2gYXZH5GooVDGSY1/7e2/ZotsGcOKy97GLnMbciIzeIFznTU9VrQF +06ZJXb4j1cPPvZ8zqTM7pjljI6ukalao6ll3+Nu9URm43wlFfQc9ARGs0JhnSbLMNc2wS9WR 1EFZ+peBDw== List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------A87E2210CD649B0B270BB604 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit perhaps kernel parameters under control of vmware: shmmax/shmall. Regards, Michael Vitale > > Thanks for the responses. > > We'll take this up with VMware support and then if it isn't a > configuration issue, move it along to Redhat Linux support. > > It was also useful to learn cgroups default support within the kernel > can use up so much memory on a system with larger RAM.  On the next > reboot this will free up about 1.6 GB RAM.  It might help with a > little wiggle room until we know more about the other issue which > seems to limit us to 1/2 our RAM. > > > On Mon, Dec 21, 2020 at 9:27 PM Tom Lane > wrote: > > frank picabia > writes: > > My VMware admin has come back with a graph showing memory use over > > the period in question.  He has looked over other indicators > > and there are no alarms triggered on the system. > > It jives with what Cacti reported.  Memory was never exhausted > > and used only 50% of allocated RAM at the most. > > > If it's not a configuration issue in Postgres, and both internal and > > external tools > > show memory was not consumed to the point of firing off the > "cannot fork" > > error, would that mean that there is a bug in either the kernel > or Postgres? > > [ shrug... ]  Postgres is just reporting to you that the kernel > wouldn't > perform a fork().  Since you've gone to great lengths to show that > Postgres isn't consuming excessive resources, either this is a > kernel bug > or you're running into some kernel-level (not Postgres) allocation > limit. > I continue to suspect the latter.  Desultory googling shows that > VMware > can be configured to enforce resource allocation limits, so maybe you > should be taking a hard look at your VMware settings. > >                         regards, tom lane > --------------A87E2210CD649B0B270BB604 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit perhaps kernel parameters under control of vmware: shmmax/shmall.

Regards,
Michael Vitale

Thanks for the responses. 

We'll take this up with VMware support and then if it isn't a configuration issue, move it along to Redhat Linux support.

It was also useful to learn cgroups default support within the kernel can use up so much memory on a system with larger RAM.  On the next reboot this will free up about 1.6 GB RAM.  It might help with a little wiggle room until we know more about the other issue which seems to limit us to 1/2 our RAM.


On Mon, Dec 21, 2020 at 9:27 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
frank picabia <fpicabia@gmail.com> writes:
> My VMware admin has come back with a graph showing memory use over
> the period in question.  He has looked over other indicators
> and there are no alarms triggered on the system.
> It jives with what Cacti reported.  Memory was never exhausted
> and used only 50% of allocated RAM at the most.

> If it's not a configuration issue in Postgres, and both internal and
> external tools
> show memory was not consumed to the point of firing off the "cannot fork"
> error, would that mean that there is a bug in either the kernel or Postgres?

[ shrug... ]  Postgres is just reporting to you that the kernel wouldn't
perform a fork().  Since you've gone to great lengths to show that
Postgres isn't consuming excessive resources, either this is a kernel bug
or you're running into some kernel-level (not Postgres) allocation limit.
I continue to suspect the latter.  Desultory googling shows that VMware
can be configured to enforce resource allocation limits, so maybe you
should be taking a hard look at your VMware settings.

                        regards, tom lane

--------------A87E2210CD649B0B270BB604--