Re: Thousands of errors...what happened?

From: john gale <john(at)smadness(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Jerry Levan <jerry(dot)levan(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Thousands of errors...what happened?
Date: 2014-03-24 17:54:59
Message-ID: 73AC0E6E-E7CA-4D3E-9303-754A1DB98257@smadness.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Mar 24, 2014, at 9:43 AM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:

> Jerry Levan wrote:
>> The other day I attempted to connect to my 9.3.2 postgresql data base and my connection
>> attempts kept failing.
>>
>> I found about 100000 lines in the log file that looked like:
>>
>> ERROR: could not seek to end of file "global/12292": Too many open files
>> LOG: out of file descriptors: Too many open files; release and retry
>
> I think this means there is a file descriptor leak somewhere; maybe a
> third-party module by Apple. It might be useful to see what files are
> open by the offending process; in Linux you would just see
> ls -l /proc/{pid}/fd
> but I don't know if this works on Mac OS X.

% sudo lsof

is the tool. It doesn't have to be a leak; if you've ignored the postgres configuration, you could have a potential max clients that exceeds the standard open file limit of the system, which you may have just been lucky in never reaching until a surge in traffic generated enough postgres children to breach the limit. Adjust open file limits for launchd-based agents through /etc/launchd.conf:

https://www.google.com/search?client=safari&rls=en&q=launchd.conf+open+files

~ john

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ken Barber 2014-03-24 17:59:25 Re: General Advice for avoiding concurrency during schema migrations
Previous Message Amador Alvarez 2014-03-24 17:42:10 Re: General Advice for avoiding concurrency during schema migrations