Re: "Too many open files in system" error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jonatan Evald Buus <jonatan(dot)buus(at)cellpointmobile(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: "Too many open files in system" error
Date: 2009-08-12 23:25:46
Message-ID: 15021.1250119546@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Jonatan Evald Buus <jonatan(dot)buus(at)cellpointmobile(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Rob Newton 2009-08-13 00:22:27 Re: XID wraparound in 8.4
Previous Message Adam Ruth 2009-08-12 22:06:33 Windows 7 and SSPI