Apache can not start and shows in error log messages like this:
[emerg] (28)No space left on device: \ Couldn't create accept lock \ (/var/log/httpd/accept.lock.24765) (5)
but the partition is not full, it’s not a quota problem and yes – the partition is writable. So where is the problem?
Solution
List semaphore arrays owned by user apache
:
ipcs -s | grep apache
Cleanup stuck semaphores:
ipcs -s \ | grep apache \ | perl -e 'while (<STDIN>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}'
or
ipcs -s \ | grep apache \ | perl -alne 'qx(ipcrm -s $F[1])'
or
for i in `ipcs -s \ | awk '/apache/ {print $2}'`; \ do (ipcrm -s $i); done
Now restart Apache. Problem solved?