Re: Changing the default configuration - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Changing the default configuration
Date
Msg-id 5061.1045068537@sss.pgh.pa.us
Whole thread Raw
In response to Re: Changing the default configuration  (Robert Treat <xzilla@users.sourceforge.net>)
List pgsql-hackers
Robert Treat <xzilla@users.sourceforge.net> writes:
> Had this happen at a previous employer, and it definitely is bad. I
> believe we had to do a reboot to clear it up. And we saw the problem a
> couple of times since the sys admin wasn't able to deduce what had
> happened the first time we got it. IIRC the problem hit somewhere around
> 150 connections, so we ran with 128 max. I think this is a safe number
> on most servers these days (running linux as least) though out of the
> box I might be more inclined to limit it to 64. If you do hit a file
> descriptor problem, *you are hosed*.

If you want to run lots of connections, it's a real good idea to set
max_files_per_process to positively ensure Postgres won't overflow
your kernel file table, ie, max_connections * max_files_per_process
should be less than the file table size.

Before about 7.2, we didn't have max_files_per_process, and would
naively believe whatever sysconf() told us was an okay number of files
to open.  Unfortunately, way too many kernels promise more than they
can deliver ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: Changing the default configuration (was Re:
Next
From: Teodor Sigaev
Date:
Subject: Re: Q about InsertIndexResult