Optimal configuration to eliminate "out of file descriptors" error

From: Joe Lester <joe_lester(at)sweetwater(dot)com>
To: postgres list <pgsql-general(at)postgresql(dot)org>
Subject: Optimal configuration to eliminate "out of file descriptors" error
Date: 2004-04-14 17:48:17
Message-ID: E953B60E-8E3B-11D8-AD57-000A95A58EA0@sweetwater.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm trying to figure out what the optimal Postgres configuration would
be for my server (with 200 connecting clients, even though I'd really
like to get it up to 500).

I've got a 700 MHz eMac running Mac OS 10.3.2 (Panther) with 512 MB of
RAM. I've messed around with some settings but I'm still getting an
occasional "out of file descriptor" error, especially when performing a
VACUUM. Like so...

2004-04-13 23:30:05 LOG: out of file descriptors: Too many open files;
release and retry
CONTEXT: writing block 1 of relation 67553/16604

I'm going to do my best to provide my current system settings that
relate to Postgres. It would be great if someone could tell me where
I'm way off, and get me on the right track. I'm under the impression
that my machine should be able to handle 200 to 500 client connections.
If that's not the case, I'm fine with getting new hardware, I just
don't want to go to that step "willy nilly". Thanks!

1. Snipped from postgresql.conf (the only three settings I've changed)

max_connections = 200
...
shared_buffers = 2000
...
max_files_per_process = 100

2. Snipped from /etc/profile

ulimit -u 512

3. Snipped from /etc/rc

sysctl -w kern.sysv.shmmax=167772160
sysctl -w kern.sysv.shmmin=1
sysctl -w kern.sysv.shmmni=32
sysctl -w kern.sysv.shmseg=8
sysctl -w kern.sysv.shmall=65536

4. Snipped from etc/sysctl.conf

# Turn up maxproc
kern.maxproc=2048

# Turn up the maxproc per user
kern.maxprocperuid=512

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2004-04-14 18:28:35 Re: [HACKERS] Remove MySQL Tools from Source?
Previous Message Marc G. Fournier 2004-04-14 17:35:51 Re: Donating