Re: LOG: could not fork new process for connection: Cannot allocate memory - Mailing list pgsql-general

From Jeff Janes
Subject Re: LOG: could not fork new process for connection: Cannot allocate memory
Date
Msg-id CAMkU=1zSyzK3S15QLpLXNtRnQxX+jmRGw_JDdgvKA2V1i7EfrA@mail.gmail.com
Whole thread Raw
In response to Re: LOG: could not fork new process for connection: Cannot allocate memory  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
List pgsql-general
On Sun, Aug 28, 2016 at 5:18 PM, Jim Nasby <Jim.Nasby@bluetreble.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@hogranch.com
<mailto:pierce@hogranch.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

pgsql-general by date:

Previous
From: Jim Nasby
Date:
Subject: Re: LOG: could not fork new process for connection: Cannot allocate memory
Next
From: Pavel Stehule
Date:
Subject: Re: a column definition list is required for functions returning "record"