/
/
Apache start error: No space left on device: AH00023

Apache start error: No space left on device: AH00023

Symptoms

When trying to start or restart Apache, one of two errors occurs:

  • No space left on device: AH00023: Couldn't create the rewrite-map mutex
  • No space left on device: AH00023: Couldn't create the ssl-cache mutex

Causes

The limitation on semaphores in the operating system has been reached.

Solution

First, we need to find out the current semaphore limitations in the system by executing the following command:

ipcs -sl

Pay attention to the values of parameters max number of arrays and max semaphores system wide. Next, check the actual number of occupied semaphores using the following command:

ipcs -us

If the value of the used arrays parameter exceeds the limitation of the max number of arrays parameter or the value of the allocated semaphores parameter exceeds the limitation for max semaphores system wide, it will be necessary to clear the occupied semaphores.

To clear semaphores, run the following command:

ipcs -s | awk -v user=apache '$3==user {system("ipcrm -s "$2)}'

Make sure the number of occupied semaphores equals zero by executing the command:

ipcs -us

Next, restart the Apache web server service:

  • systemctl restart httpd- for RHEL-based systems;
  • systemctl restart apache2 - for Debian-based systems.

In this article