No space left on device: Couldn’t create accept lock
[notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)
[crit] (28)No space left on device: mod_rewrite: Parent could not create RewriteLock file /usr/local/apache/logs/rewrite_lock
semget: [emerg] (28) No space left on device OR Apache: No space left on device: Couldn’t create accept lock
You may receive “No space left on device” message while starting the Apache service, however, it has nothing to do with the disk space. The reason behind the error message is Semaphores.
You will have to kill the active semaphore processes in order to start Apache service successfully.
To list the PIDs of the active semaphore processes, execute:
# ipcs -s
—— Semaphore Arrays ——– key
semid owner perms nsems
0×00000000 366673220 apache 600 1
0×00000000 366706589 apache 600 1
0×00000000 366732358 apache 600 1
0×00000000 366734353 apache 600 1
It will list all the PIDs which need to be killed:
# ipcrm -s PID
If you have a long list of processes, execute the following commands:
# ipcs -s | grep apache | awk ‘ print $2 ‘ | xargs ipcrm sem
#for i in `ipcs -s | awk ‘print $2’`; do (ipcrm -s $i); done
Replace ”apache’ in the above command with the actual “owner” of the processes returned in the “ipcs -s” command. Apache will start successfully once these processes are killed.
What is a Semaphore?
Semaphores are use to communicate between active processes. Apache write down some information of such processes before the communication actually begins and if Apache fails to write the information, it results in the “No space left on device: Couldn’t create accept lock” error message.
Apache: No space left on device: Couldn’t create accept lock
No comments:
Post a Comment