How to fix Apache error (28)No space left on device
On some occasions apache will just abruptly fail, and become stopped, failing to restart with an error message like
————————————-
[Tue Aug 18 16:34:45 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)
[Tue Aug 18 16:34:45 2009] [crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock
Configuration Failed
[Tue Aug 18 16:38:46 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)
[Tue Aug 18 16:38:46 2009] [crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock
Configuration Failed
————————————-
Checking your disk shows that you have plenty of space. The problem is that apache didn’t shut down properly, and it’s left myriads of semaphore-arrays left, owned by my apache-user. Run:-
# ipcs -s | grep nobody
Removing these semaphores immediately should solve the problem and allow apache to start.
# ipcs -s | grep nobody | perl -e ‘while (<STDIN>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}’









