How To Fix Apache Error “(28)No space left on device”
AH00023: Couldn't create the rewrite-map mutex
AH00016: Configuration Failed
On some occasions apache server will just fail, and become crashed, failing to restart with an error message like:
You see this result :-
If you see an error similar to the bellow, it could indicate that your server has run out of semaphores. To see how many semaphores are being used, type this command:-
# ipcs -s
You see the result
------ Semaphore Arrays --------
key semid owner perms nsems
0x00000000 131072 apache 600 1
0x00000000 163841 apache 600 1
0x00000000 65538 apache 600 1
0x00000000 98307 apache 600 1
0x00000000 196612 apache 600 1
Or check the total Locks
# ipcs -s | wc -l
132
Then type this command To fix it and get Apache server started again, we must clean the semaphores. Run the following command to flush them:
# for i in `ipcs -s | awk '/httpd/ {print $2}'`; do (ipcrm -s $i); done
OR
# for whatever in `ipcs -s | awk '{print $2}'`; do ipcrm -s $whatever; done
# sysctl -p
AH00023: Couldn't create the rewrite-map mutex
AH00016: Configuration Failed
On some occasions apache server will just fail, and become crashed, failing to restart with an error message like:
# systemctl restart httpd# tail -f /var/log/httpd/error_log
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
You see this result :-
(28)No space left on device: AH00023: Couldn't create the rewrite-map mutexOr like that.
AH00016: Configuration Failed
If you see an error similar to the bellow, it could indicate that your server has run out of semaphores. To see how many semaphores are being used, type this command:-
# ipcs -s
You see the result
------ Semaphore Arrays --------
key semid owner perms nsems
0x00000000 131072 apache 600 1
0x00000000 163841 apache 600 1
0x00000000 65538 apache 600 1
0x00000000 98307 apache 600 1
0x00000000 196612 apache 600 1
Or check the total Locks
# ipcs -s | wc -l
132
Then type this command To fix it and get Apache server started again, we must clean the semaphores. Run the following command to flush them:
# for i in `ipcs -s | awk '/httpd/ {print $2}'`; do (ipcrm -s $i); done
OR
# for whatever in `ipcs -s | awk '{print $2}'`; do ipcrm -s $whatever; done
If that command not work on older server then you may stop the Apache service first.
# /etc/init.d/httpd stop OR # systemctl stop httpd
# ipcs -s | grep nobody | gawk '{ print $2 }' | xargs -n 1 ipcrm sem
# /etc/init.d/httpd start OR # systemctl start httpd
You may make the little changes in /etc/sysctl.conf to increase the semaphore limits on your server.
You can do that by adding the following to the /etc/sysctl.conf
kernel.msgmni = 512After, type the following command to update new setting for kernel
kernel.sem = 250 128000 32 512
# sysctl -p
0 comments:
Post a Comment