The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]

Scripts / handy tips
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Previous Message  |  Next Message 
 FATAL: could not create semaphores: No space left on device
Author: Dan 
Date:   29-11-06 13:32

Ever had this happen?

# /usr/local/etc/rc.d/010.pgsql.sh start
could not start postmaster


Check /var/log/messages:


Nov 29 08:29:15 bast postgres[3937]: [1-1] FATAL: could not create semaphores: No space left on device
Nov 29 08:29:15 bast postgres[3937]: [1-2] DETAIL: Failed system call was semget(5432003, 17, 03600).
Nov 29 08:29:15 bast postgres[3937]: [1-3] HINT: This error does *not* mean that you have run out of disk space.
Nov 29 08:29:15 bast postgres[3937]: [1-4] It occurs when either the system limit for the maximum number of semaphore sets (SEMMNI), or the system wide maximum number of
Nov 29 08:29:15 bast postgres[3937]: [1-5] semaphores (SEMMNS), would be exceeded. You need to raise the respective kernel parameter. Alternatively, reduce PostgreSQL's
Nov 29 08:29:15 bast postgres[3937]: [1-6] consumption of semaphores by reducing its max_connections parameter (currently 40).
Nov 29 08:29:15 bast postgres[3937]: [1-7] The PostgreSQL documentation contains more information about configuring your system for PostgreSQL.

For me, on my production database server, I added the following entries to /etc/loader.conf and rebooted.

kern.ipc.semmni=40
kern.ipc.semmns=240
kern.ipc.semmnu=60
kern.ipc.semmap=120

The reboot is necessary because some of the above knobs cannot be set at run time:

[root@bast:/boot] # sysctl -w kern.ipc.semmni=40
sysctl: oid 'kern.ipc.semmni' is a read only tunable
sysctl: Tunable values are set in /boot/loader.conf
[root@bast:/boot] # sysctl -w kern.ipc.semmns=240
sysctl: oid 'kern.ipc.semmns' is a read only tunable
sysctl: Tunable values are set in /boot/loader.conf
[root@bast:/boot] # sysctl -w kern.ipc.semmnu=60
sysctl: oid 'kern.ipc.semmnu' is a read only tunable
sysctl: Tunable values are set in /boot/loader.conf
[root@bast:/boot] # sysctl -w kern.ipc.semmap=120
kern.ipc.semmap: 30 -> 120


Enjoy

--
Webmaster

 Reply To This Message  |  Forum List  |  Flat View   Newer Topic  |  Older Topic 

 Topics Author  Date
 FATAL: could not create semaphores: No space left on device   new
Dan 29-11-06 13:32 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org