Tag Archives: Parent could not create RewriteLock file /usr/local/apache/logs/rewrite_lock.

Apache error – No space left on device !

Facing the following error on Apache ?

Apache: [emerg] (28)No space left on device: Couldn’t create accept lock [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec) [crit] (28) No space left on device: mod_rewrite: Parent could not create RewriteLock file /usr/local/apache/logs/rewrite_lock

You might check if the disk space is full and can easily confirm that is not the reason for this error.

The reason behind the error message is Semaphores. You will have to kill the hung/stuck semaphore processes in order.

To list the PIDs of the active semaphore processes, execute:

# ipcs -s
—— Semaphore Arrays ——– key
semid owner perms nsems
0×00000000 xxxxxxxxxx apache 600 1
0×00000000 xxxxxxxxxx apache 600 1
0×00000000 xxxxxxxxxx apache 600 1
0×00000000 xxxxxxxxxx apache 600 1

To kill those process, use the command :

# ipcrm -s PID

Once those stuck/hung processes are cleared, restart your Apache service.