Re: "Too many open files in system" error - Mailing list pgsql-admin

From Tom Lane
Subject Re: "Too many open files in system" error
Date
Msg-id 15021.1250119546@sss.pgh.pa.us
Whole thread Raw
In response to "Too many open files in system" error  (Jonatan Evald Buus <jonatan.buus@cellpointmobile.com>)
Responses Re: "Too many open files in system" error  (Jonatan Evald Buus <jonatan.buus@cellpointmobile.com>)
List pgsql-admin
Jonatan Evald Buus <jonatan.buus@cellpointmobile.com> writes:
> Is it normal for PostGreSQL to have close to 5000 file handles open while
> running?

It can be, if you have enough active backends and enough tables that
they are touching.  You have not provided nearly enough information to
gauge what the expected number of actual open files might be in your
installation, but I'll just point out that at max_connections = 256 and
max_files_per_process = 500 you have no grounds to complain if Postgres
tries to use 128000 open files.  If that value of max_connections
actually is representative of what you need to do, I'd recommend cutting
max_files_per_process to a couple hundred and upping the kernel limit
to somewhere north of 50000.

            regards, tom lane

pgsql-admin by date:

Previous
From: Adam Ruth
Date:
Subject: Windows 7 and SSPI
Next
From: Alvaro Herrera
Date:
Subject: Re: XID wraparound in 8.4