pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John Allgood <jallgood@the-allgoods.net>
To: Geoffrey <esoteric@3times25.net>
Cc: pgsql-admin@postgresql.org, Terry Lee Tucker <terry@leetuckert.net>
Cc: J. D. Pearson <jpearson@turbocorp.com>
Subject: Re: Out of file-descriptors message
Date: Thu, 30 Nov 2006 09:52:07 -0500
Message-ID: <456EF017.3060208@the-allgoods.net> (raw)
In-Reply-To: <456EEECC.1000701@3times25.net>
References: <456DF2DE.3060002@turbocorp.com>
	<4727.1164835974@sss.pgh.pa.us>
	<456E03C9.6070204@the-allgoods.net>
	<20061129222523.GI7001@alvh.no-ip.org>
	<456EE6CE.2030106@3times25.net>
	<20061130142758.GI15105@alvh.no-ip.org>
	<456EEECC.1000701@3times25.net>

Maybe the whole problem is with ulimit. Ulimit sets the max files per
user at the shell and postgres might be exceeding the 1024 limit. What
would increasing this value to 2048 do?

Geoffrey wrote:
> Alvaro Herrera wrote:
>> Geoffrey wrote:
>>> Alvaro Herrera wrote:
>>>> John Allgood wrote:
>>>>> Hey Tom
>>>>>
>>>>>    I assume that if it is the kernel running out of descriptors
>>>>> that I
>>>>> would get the messages in dmesg. This message only appears in the log
>>>>> file for that database.
>>>> Yeah, the point is that you have the max_files_per_process setting
>>>> higher than what the kernel likes.  So decrease it, and Postgres will
>>>> adjust itself to use less file descriptors by closing and reopening
>>>> files as needed.
>>> I work with the original poster and wanted to make sure the problem
>>> here is clear.
>>
>> Yes, that was understood from the beginning.
>>
>>> The 'out of file descriptors' message is coming from Postgresql, not
>>> the kernel.  Thus, it doesn't make sense to me that the
>>> max_files_per_process setting is too high.  I would think we need to
>>> increase it so that Postgresql will stop generating these errors.
>>
>> No, you need to lower it so that Postgres doesn't _try_ to use as many
>> file descriptors.  Read this again:
>>
>>>>                                    So decrease it, and Postgres will
>>>> adjust itself to use less file descriptors by closing and reopening
>>>> files as needed.
>
> Okay, I'm just not getting it.  Postgres complains that it is out of
> file descriptors.  The kernel is not complaining about any such issues.
>
>                         So I should lower the max_files_per_process
> value and this will rid us of the 'out of file descriptors' error?
>
> Is it because the max_files_per_process is greater then the number of
> file descriptors that are alloted to Postgres by the kernel?
>



view thread (18+ messages)  latest in thread

Message-ID: <456EF017.3060208@the-allgoods.net>
Permalink:  ../456EF017.3060208@the-allgoods.net/
Also on:    postgresql.org/message-id/456EF017.3060208@the-allgoods.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: jallgood@the-allgoods.net, esoteric@3times25.net, terry@leetuckert.net, jpearson@turbocorp.com
  Subject: Re: Out of file-descriptors message
  In-Reply-To: <456EF017.3060208@the-allgoods.net>
  References: <456DF2DE.3060002@turbocorp.com> <4727.1164835974@sss.pgh.pa.us> <456E03C9.6070204@the-allgoods.net> <20061129222523.GI7001@alvh.no-ip.org> <456EE6CE.2030106@3times25.net> <20061130142758.GI15105@alvh.no-ip.org> <456EEECC.1000701@3times25.net> <456EF017.3060208@the-allgoods.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox