The error "failed to lock proc mutex: Permission denied" appears in the Apache error log when the web server cannot acquire the lock (mutex) it uses to coordinate its worker processes. Apache usually still serves requests, but the message floods the log and can signal a stale lock file, a lock directory that is missing or not writable, exhausted System V semaphores, or SELinux blocking the lock. It is a server-level issue that needs root access to fix.
Point Apache's mutex at a writable directory, then restart
The usual cause is a missing or wrong-permission lock directory. Set the Apache Mutex directive to a known-writable path, or switch to System V semaphores, confirm the directory exists and is owned correctly, then restart Apache. The error clears on the next clean start.
This is handled on our side
If you are on shared or reseller hosting and see this in your logs, you do not need to do anything. It is a server-level configuration issue we manage. Open a ticket if a site is actually down and we will check it. The steps below apply to VPS and dedicated servers where you have root.
01. What the Error Means
Apache uses a mutex (a mutual-exclusion lock) to coordinate access to shared resources such as the connection accept queue across its worker processes. On start and during operation it creates lock files or System V semaphores for these mutexes. "failed to lock proc mutex: Permission denied" means a worker could not acquire that lock because the lock file or its directory is not writable by the Apache user, the lock is stale, or the kernel refused the operation.
In most cases Apache still serves requests, but the error repeats in the log and can point to an underlying problem (a full filesystem, leaked semaphores, or a security policy) that will eventually cause failures. It is worth fixing rather than ignoring.
Note the exact timestamp of the error and whether it coincides with an Apache restart, a backup window, or the disk filling up. That correlation usually points straight at the cause.
02. Set the Apache Mutex Mechanism
The Mutex directive controls how Apache implements its locks. First check the current setting:
grep -ri "^Mutex" /etc/httpd/conf /etc/httpd/conf.d 2>/dev/null
# Debian/Ubuntu:
grep -ri "^Mutex" /etc/apache2/ 2>/dev/null
Set a reliable mechanism in the main config. File-based locking in a known-writable directory is the common choice:
Mutex file:/run/httpd default
Alternatively, System V semaphores avoid the filesystem entirely, which sidesteps directory-permission and disk-space issues:
Mutex sysvsem default
Then restart Apache and re-check the log:
systemctl restart httpd # RHEL / CloudLinux / cPanel
systemctl restart apache2 # Debian / Ubuntu
On cPanel servers, make persistent Apache changes through the Apache configuration include files or WHM's Apache Configuration, not by hand-editing httpd.conf, since cPanel rebuilds that file and will overwrite manual edits.
03. Clear a Stale Lock or Fix Permissions
If the mutex uses a lock file, a leftover file from an unclean shutdown, or a directory the Apache user cannot write to, will trigger the error. Confirm the lock directory exists, is owned appropriately, and sits on a writable filesystem:
- Check the directory - the default is often /run/httpd or /var/run/apache2. Confirm it exists with
ls -ld /run/httpd. - Recreate it if missing -
mkdir -p /run/httpd && chown root:root /run/httpd(it is normally owned by root; Apache children place per-process locks inside). - Restart Apache so it recreates fresh lock files in the correct place.
Because /run is a tmpfs that is rebuilt on boot, a stale lock there usually clears with a restart. Persistent problems point at the directory permissions or the Mutex path from section 02.
04. Disk Space and Semaphore Exhaustion
A full filesystem or exhausted System V semaphores both surface as mutex lock failures.
Check disk space on the volumes that hold the lock directory and temp space:
df -h /run /tmp /var
If any are full, clear space and restart Apache. Check System V semaphores, which have a system-wide limit that leaked processes can exhaust:
ipcs -s # list semaphore arrays
ipcs -s | wc -l # how many are in use
If semaphores are maxed out by stale Apache arrays, remove only the orphaned ones that belong to a stopped Apache, then restart:
ipcrm -s <semid>
Only remove semaphores you have confirmed belong to a stopped Apache. Removing semaphores in use by other services can crash them.
05. SELinux Blocking the Mutex
On RHEL-family servers with SELinux enforcing, a mutex file in a non-standard location can be denied even when the Unix permissions look correct. Check the audit log around the time of the error:
grep -i httpd /var/log/audit/audit.log | grep -i denied
If SELinux is denying the lock, either keep the Mutex path in the default SELinux-labeled location (such as /run/httpd), or correct the context on your chosen directory:
restorecon -Rv /run/httpd
Keeping the lock directory in its default location is the simplest way to stay compatible with SELinux policy.
06. On Shared Hosting
If you are on shared or reseller hosting, you cannot change the Apache configuration, mutex mechanism, or semaphores yourself, and you do not need to. These are managed at the server level. If you noticed the message in a log and your site is working, no action is needed. If a site is actually down or returning 500 errors, open a ticket and include the timestamp so we can match it to the server logs.
Frequently Asked Questions
What causes failed to lock proc mutex Permission denied?
Apache could not acquire the lock it uses to coordinate worker processes. The usual causes are a missing or wrong-permission lock directory, a stale lock file from an unclean shutdown, a full filesystem, exhausted System V semaphores, or SELinux denying the lock. It is a server-level issue.
How do I fix the Apache proc mutex error?
As root, set the Apache Mutex directive to a writable location (Mutex file:/run/httpd default) or to System V semaphores (Mutex sysvsem default), make sure the lock directory exists and is writable, then restart Apache. Also check disk space and for leaked semaphores.
Is this error breaking my website?
Often not. Apache usually keeps serving requests while logging the message. But it signals an underlying problem (full disk, leaked semaphores, or a permission or SELinux issue) that can cause failures later, so it is worth fixing rather than ignoring.
I am on shared hosting and see this error, what do I do?
Nothing on your end. It is a server-level configuration issue we manage. If your site is working, no action is needed. If a site is down or throwing 500 errors, open a support ticket with the timestamp and we will investigate.
Quick Recap
- Server-level error - Apache could not lock its coordination mutex; needs root to fix.
- Set the Mutex directive - file:/run/httpd or sysvsem, then restart Apache.
- Check the lock directory - it must exist and be writable; a stale lock clears on restart.
- Check disk and semaphores - df -h and ipcs -s; clear what is full or leaked.
- SELinux - keep the default lock path or restorecon the directory.
- Shared hosting - no action needed; open a ticket if a site is down.
Apache troubleshooting · Last updated November 2026 · Browse all Server Maintenance articles
