Some time we may enter in a situation where Apache is not starting in the server and the error logs shows the following error:
[emerg] (28)No space left on device: Couldn’t create accept lock (/usr/local/apache/logs/accept.lock.
It’s because the sempahore arrays in system memory is full. Check if there’re any processes in semaphore that are owned nobody in semaphores.
[b]# ipcs -s|grep nobody[/b]
If you can see the semaphore processes for nobody, eventhough no apache processes are running, you can remove them safely. It happens when Apache dies without clearing the Semaphore arrays.
We can run the following command to remove it safely:
[b]# for semid in `ipcs -s | grep nobody | cut -f2 -d" "`; do ipcrm -s $semid; done [/b]
Now restart the Apache service. [b]# service apache restart [/b]