Search Our Database

Apache Fails to Start Due to Mutex/Semaphore Errors (No space left on device)

Last updated on |
by

Introduction

When managing Apache HTTP Server (httpd) on a Linux-based system, encountering startup failures accompanied by errors such as Couldn’t create the authdigest-opaque mutex  or No space left on device can indicate underlying issues with system-level semaphore limits. Apache may fail to start and log errors like the following:

AH00023: Couldn't create the authdigest-opaque mutex
AH01760: failed to create lock (opaque_lock)
(28)No space left on device

This usually indicates that the system has hit its semaphore limits or has leftover semaphores from previous Apache processes.

 

Prerequisites

  • Root or sudo access
  • Apache HTTP Server installed
  • Access to the Apache error log (e.g., /var/log/httpd/error_log)

 

Step-by-step Guide

Step 1: Check existing semaphores

Once log into the server, run the following command to list all current semaphore arrays and their associated processes:

ipcs -s

 

Step 2: Remove stale semaphores

To remove one semaphore (replace xxx):

ipcrm -s xxx

To remove all semaphores owned by Apache:

for i in `ipcs -s | grep apache | awk '{print $2}'`; do ipcrm -s $i; done
⚠️ Important Note: Only delete semaphores owned by Apache to avoid affecting other processes.

 

Step 3: Restart Apache

systemctl start httpd
# or
service httpd start

Check status:

systemctl status httpd

 

Step 4: Check and increase semaphore kernel limits

View current limits:

sysctl -a | grep kernel.sem

To increase the limits temporarily:

sysctl -w kernel.sem="500 64000 64 384"

Make it permanent:

echo "kernel.sem = 500 64000 64 384" >> /etc/sysctl.conf
sysctl -p
⚠️ Important Note: Only modify semaphore limits if you’re confident they are the root cause. Misconfiguration may affect other services.

 

Conclusion

This guide resolves Apache startup issues related to mutex/semaphore limits. Clearing stale semaphores and increasing kernel limits should restore functionality.

Should you have any inquiries about the guidelines, please feel free to open a ticket through your portal account or contact us at support@ipserverone.com. We’ll be happy to assist you further.