If apache does not start , then please check the error logs with cpanel. The error
“semget: No space left on device” shows that that your server has run out of semaphores.
To check how many semaphores are being used, login to your server as root and run the following:
ipcs –s
Now to bring up the Apache service again, one has to clear the semaphores.
And for that execute the following command:
for whatever in `ipcs -s | awk ‘{print $2}’`; do ipcrm -s $whatever; done
Above command may not work with old servers. In that case, you have to do the following :
/sbin/service httpd stop
ipcs -s | grep nobody | gawk ‘{ print $2 }’ | xargs -n 1 ipcrm sem
/sbin/service httpd start
If this is a common issue occurring , you may want to increase the semaphore limits on your hosting server.
You can do that by adding the following to the /etc/sysctl.conf file:
# For increasing the semaphore limits & extend Apache’s uptime:
kernel.msgmni = 512
kernel.sem = 250 128000 32 512
Later on a user can load the new settings into the kernel:
sysctl -p