Re: LOG: could not fork new process for connection: Cannot allocate memory

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>
Cc: Ahsan Ali <ali95695(at)gmail(dot)com>, John R Pierce <pierce(at)hogranch(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: LOG: could not fork new process for connection: Cannot allocate memory
Date: 2016-08-29 04:17:38
Message-ID: CAMkU=1zSyzK3S15QLpLXNtRnQxX+jmRGw_JDdgvKA2V1i7EfrA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Aug 28, 2016 at 5:18 PM, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> wrote:

> On 8/25/16 7:45 PM, Ahsan Ali wrote:
>
> Please don't top-post; it's harder to read.
>
>> On Thu, Aug 25, 2016 at 5:29 PM, John R Pierce <pierce(at)hogranch(dot)com
>> <mailto:pierce(at)hogranch(dot)com>> wrote:
>> so there were 1818 postgres client processes at the time it coudln't
>> create a new process. thats certainly a larger number than I've
>> ever run. if I have client software that has lots and lots of idle
>> connections, I use a connection pooler like pgbouncer, in
>> transaction mode.
>>
>
> While not the most ideal, people pay way too much attention to large
> connection counts. It's not *that* big a deal.
>
> we have a pooling on the application level. however we never had this
>> issues before this start happning since last couple of days in past we
>> had over 2300 sessions but no issues.
>>
>
> Well, if I'm reading your original post correctly, this on a server that
> only has 252MB of memory, which is *very* small. Even so, according to
> `free` there's 175MB cached, which should become available as necessary.
>

I believe that is 252GB, not MB. "free -m -g" is the same thing as "free
-g"

I think his problem is more likely to be in "nproc 5500"

If he has 1818 or 2300 user session, who knows how much other miscellaneous
cruft is going on? It could easily exceed 5500.

Cheers,

Jeff

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2016-08-29 05:02:50 Re: a column definition list is required for functions returning "record"
Previous Message Jim Nasby 2016-08-29 00:18:26 Re: LOG: could not fork new process for connection: Cannot allocate memory