Thursday, April 7, 2011

No space left on device

Some times apache just fails or stops, fails to restart with an error message like

[emerg] (28)No space left on device: mod_fcgid: Can't create global mutex
or
[crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock
or
[emerg] (28)No space left on device: Couldn't create accept lock

The following command can be used to get this problem resolved:-


#ipcs -s | grep $apacheuser | awk '{print "ipcrm sem " $2}' | sh

OR

#ipcs -s | grep nobody | perl -e 'while () {@a=split(/\s+/); print `ipcrm sem $a[1]`}'  ipcrm $(ipcs -s |awk '$3=="nobody"{print "-s",$2}')

No comments: