If you have an Apache web server and for some weird reason, you cannot start the service, then you might be encountering the “No space left on device” error.

At first you will notice that no matter how many times you restart the http daemon, it just won’t start. Looking at the logs, you will see these errors:

[crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock Configuration failed.

Of course, seeing that the errors are about the disk being full, you might want to check the disk space of your machine:

#df -ah

#df -ahi

If there are still lots of spaces available, then do this command to clear the resources of your webserver:

#ipcs -s | grep apache | awk ‘{print $2}’ | xargs ipcrm sem

*Substitute ‘apache’ with the user of your Apache service*

What the command does is it removes the semaphores left by the apache daemon when it was not able to shut down properly. Also note that the particular command only clears the semaphores owned by ‘apache’ or whatever user you set to run the httpd service.

When you are done freeing the resources, you can try to restart the httpd again. It should be able to start now.

Popularity: 7% [?]

Share and Enjoy:
  • E-mail this story to a friend!
  • StumbleUpon
  • Digg
  • Technorati
  • del.icio.us
  • Reddit
  • Facebook
  • Google
  • Slashdot
  • Blogosphere News
  • TwitThis
  • NewsVine
  • Propeller
  • Furl
  • Simpy
  • Spurl

Related Posts