User:       Password:    

The knowledgebase is organized into different categories. Choose a category for a list of articles or search the knowledgebase for articles related to your question.

Search Knowledgebase

Apache will not restart!

« Back

  • Apache will not restart
  • error.log reports:
    • No space left on device: mod_rewrite: could not create rewrite_log_lock
    • No space left on device: Couldn't create accept lock
  • There is adequate disk space and memory available
There are orphaned semaphore-arrays left on the system owned by the Apache/Httpd user and Apache is unable to create new semaphores.

1. The following command sequence will remove the semaphores:

ipcs -s | grep apache | gawk '{ print $2 }' | xargs -n 1 ipcrm sem


ipcs -s | grep www-data | gawk '{ print $2 }' | xargs -n 1 ipcrm sem

[Trixbox/PIAF/Elastix/AsteriskNow, other PBX-based servers]

ipcs -s | grep asterisk | gawk '{ print $2 }' | xargs -n 1 ipcrm sem

Perl alternative (found not to work in all cases)

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

2. Restart Apache according to your distribution's init script:

/etc/init.d/apache2 restart


/etc/init.d/httpd restart

« Back

Powered by WHMCompleteSolution

Monday, 5th December 2022


Client Login



Remember Me

Forgotten Your Password?
Request a Password Reset

Webhosting Panel

>>> Panel Login

>>> Webmail

Search Knowledgebase