Re: Optimal configuration to eliminate "out of file descriptors" error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruno Wolff III <bruno(at)wolff(dot)to>
Cc: Joe Lester <joe_lester(at)sweetwater(dot)com>, postgres list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Optimal configuration to eliminate "out of file descriptors" error
Date: 2004-04-15 23:58:57
Message-ID: 22463.1082073537@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bruno Wolff III <bruno(at)wolff(dot)to> writes:
> It sounds like what is really happening is that
> you are hitting an OS limit on the number of open files. You should be
> able to increase that limit. There have also been some discussions about
> postgres doing a better job of telling when it has opened too many files
> within the last several months. I don't remember much about the details
> of the change or which version they were applied to.

If I recall that change correctly, it was prompted by the discovery that
on OS X we were drastically underestimating the number of open file
descriptors sucked up per backend. (OS X treats each semaphore as an
open file, so there are about max_connections open files per process
that we weren't accounting for.) I think it is just in CVS tip and not
yet in any released version.

For the moment the answer is to size your kernel file table on the
assumption that you need about max_connections * (max_files_per_process
+ max_connections) filetable slots just for Postgres, plus whatever you
want available for the rest of the system.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-04-16 00:08:42 Re: User permission
Previous Message Tom Lane 2004-04-15 23:42:52 Re: PLpgSQL-Problem