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


[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




I cant use the Linux Pipe character in ehow, so please replace # with the pipe character ( shift \ )

Instructions

    • 1

      Check for semaphore-arrays owned by your apache-user (assuming user apache)
      ipcs -s # grep apache

    • 2

      Removing the semaphores should immediately solve the problem.

      ipcs -s # grep apache # perl -e 'while () { @a=split(/\s+/); print `ipcrm sem $a[1]`}'

    • 3

      On a couple of machines I found this not to work, it gave a few errors.
      usage: ipcrm [ [-q msqid] [-m shmid] [-s semid]
      [-Q msgkey] [-M shmkey] [-S semkey] ... ]
      deprecated usage: ipcrm {shm # msg # sem} id ...

      If thats you, continue on

    • 4

      Do this instead of what is in Step 2 if you get the error in step 3
      for i in `ipcs -s # grep apache # awk '{print $2}'` ; do ipcrm -s $i; done

Tips & Warnings

  • I cant use the Linux Pipe character in ehow, so please replace # with the pipe character ( shift \ )

Related Searches:

Comments

You May Also Like

Related Ads

Featured