No space left on device: AH00023: Couldn’t create the rewrite-map mutex

From time to time, Apache will fail to start after an update or reboot of the server.

Checking the error log at /var/log/httpd/error_log will show an error like:

No space left on device: AH00023: Couldn’t create the rewrite-map mutex

Although, the error message may vary slightly and might show something like:
(28)No space left on device: Cannot create SSLMutex
(28)No space left on device: Couldn't create accept lock

This is almost always caused by the semaphore limit of the OS, and Apache not properly cleaning up after itself. Luckily this is a simple problem to fix. Simply execute the following command via SSH or console:

ipcs -s | awk -v user=apache '$3==user {system("ipcrm -s "$2)}'
  • apache, error, mutex, ssl, error_log, start, fails, restart, httpd, centos
  • 22 Users Found This Useful
Was this answer helpful?

Related Articles

Apache configuration for receiving reverse-proxied SSL traffic

Many customers use SSL-terminating reverse proxies and load balancers in front of their Apache...

Apache 2.4 .htpasswd protection and whitelisting multiple IP addresses

A customer asked us to secure their development environment using .htaccess and .htpassword...

Redirect http to https

Once you've got your SSL certificate installed, you'll want to switch your site traffic from http...

Optimise cPanel PHP-FPM performance

Activating a PHP-FPM pool for your cPanel domain will give a hefty performance boost over the...

Nginx-like "microcaching" using Apache mod_cache

Nginx is well known for its high performance 'microcache' feature, which is often used to make...