NetBSD-Users archive

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

Re: postgresql 8.4 semaphores ...

On 06/06/10 15:39, Malcolm Herbert wrote:
On Sun, Jun 06, 2010 at 12:37:15PM +0200, Jean-Yves Migeon wrote:
|On 06/06/10 10:39, Malcolm Herbert wrote:
|>still, postgresql fails to start with an error complaining about semaphores 
again (instead of memory):
|>|FATAL:  could not create semaphores: No space left on device
|>|DETAIL:  Failed system call was semget(31, 17, 03600).
|>|HINT:  This error does *not* mean that you have run out of disk space.
|>|       It occurs when either the system limit for the maximum number of 
semaphore sets (SEMMNI), or the system wide maximum number of semaphores (SEMMNS), 
would be exceeded.  You need to raise the respective kernel parameter.  
Alternatively, reduce PostgreSQL's consumption of semaphores by reducing its 
max_connections parameter (currently 13).
|>starting to tear out my hair here ...
|Hmm, I don't think that the max number of sets or identifiers is the
|problem here, but rather the maximum number of memory that could be
|shared for locking. Do you still have ENOSPC when you increase

bumped that to 16384 (up from 4096) and still get the same error ... what would 
be a suitable upper bound for this value?

It is already high enough; on my host, 40 max_connections, I have the following values:
# sysctl kern.ipc
kern.ipc.sysvmsg = 1
kern.ipc.sysvsem = 1
kern.ipc.sysvshm = 1
kern.ipc.shmmax = 8388608
kern.ipc.shmmni = 128
kern.ipc.shmseg = 128
kern.ipc.shmmaxpgs = 2048
kern.ipc.shm_use_phys = 0
kern.ipc.msgmni = 40
kern.ipc.msgseg = 2048
kern.ipc.semmni = 10
kern.ipc.semmns = 60
kern.ipc.semmnu = 30

For 8.4. Granted, the system is 5.1_RC, not -current.

Could you post the result of ipcs -b and ipcs -S, please?

Jean-Yves Migeon

Home | Main Index | Thread Index | Old Index