Re: insufficient file descriptors on Mac OS X

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
 
> Maximilian Tyrtania <mty@xxxxxxxxxxxxxxxx> writes:
>> <%2007-11-09 14:46:42 CETFATAL:  53000: insufficient file descriptors
>> available to start server process
> 
> This is not a shared-memory problem.
> 
> On my Mac, ulimit -n seems to be 256 by default, and you've got
> max_connections = 240 so nearly all of those will be eaten by
> semaphores.
> 
> You could change the ulimit setting, back off max_connections,
> or apply this patch:
> http://archives.postgresql.org/pgsql-committers/2007-09/msg00399.php

Ah, okay. I think I'd like to change the ulimit -n setting (basically
because i am new to PG and feel uneasy about applying patches yet), but I
guess that would have to be done at boot time, right? Or at least before the
server starts (which is at boot time in my case).

> BTW, if you're really hoping to have 240 connections, you're
> gonna need to do something about ulimit -u too.

> max user processes            (-u) 100

Okay, I managed to change that via sysctl.conf which now looks like this:

kern.sysv.shmmax=134217728
kern.sysv.shmmin=1
kern.sysv.shmmni=1024
kern.sysv.shmseg=32
kern.sysv.shmall=65536
kern.maxproc=512
kern.macprocperuid=512

Btw, the machine (Mac OS 10.4.10) accepts those settings now, i didn't need
to change /etc/rc.

Now ulimit -a is

Sputnik-Server:/ administrator$ ulimit -a
core file size        (blocks, -c) 0
data seg size         (kbytes, -d) 6144
file size             (blocks, -f) unlimited
max locked memory     (kbytes, -l) unlimited
max memory size       (kbytes, -m) unlimited
open files                    (-n) 256
pipe size          (512 bytes, -p) 1
stack size            (kbytes, -s) 8192
cpu time             (seconds, -t) unlimited
max user processes            (-u) 266
virtual memory        (kbytes, -v) unlimited

So basically I managed to deal with the ulimit -u problem, but not yet with
the ulimit -n one. For the time being I lowered the max_connections to 200,
which allows me to start the server.
I wonder if there is a way to set the number of allowed open files via
sysctl.conf or if there is some other way to set that value at boot time
already.

Thanks a lot,

Maximilian Tyrtania




---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux