[crit] (28) No space left on device: mod_jk: could not create jk_log_loc
This article helps you to Fix: “No space left on device” errors. This error can be found in the Apache error log. This issue is due to the Apache is running out of Semaphores. Semaphores are used for communicating between the active processes of a certain application.
Error:
Apache service won’t start.
[Mon Aug 24 09:50:21 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec) [Mon Aug 24 09:50:21 2015] [crit] (28) No space left on device: mod_jk: could not create jk_log_lock Configuration Failed
Error log Path:
Apache error log paths:
cPanel: /usr/local/apache/logs/error_log No control panel: /etc/httpd/logs/error_log
The cause of the issue:
This issue is due to the Apache is running out of Semaphores. Semaphores are used for communicating between the active processes of a certain application. In the case of Apache, Semaphores are used to communicate between the parent and child processes. Generally, Apache cleans up these things itself, but sometimes it can’t due to some semaphores are got stuck. Then it can’t communicate properly with the newly started processes. Hence, the Apache goes down.
Fix:
Use the below command to get the list of semaphores.
ipcs -s
You can find the Apache process is running as nobody or as Apache itself. The stale semaphores can clear using the following command. The below command clears the Apache processes running as Apache. If you find in the output of ipcs -s as the Apache process is running as nobody, you need to change the httpd in the following command to nobody.
for i in `ipcs -s | awk '/httpd/ {print $2}'`; do (ipcrm -s $i); done
Now you can restart the Apache service.
/etc/init.d/httpd restart
If it didn’t restart properly, you may need to increase the semaphore limit. You can check the current limit using the below command.
# cat /proc/sys/kernel/sem 250 32000 32 128
Increase those limits by adding the below line to /etc/sysctl.conf file.
kernel.sem = 500 64000 64 256
This changes will take the effect in next reboot. If you need to make the changes in immediate effect, run the below command.
sysctl -p
That’s it!
Also Read:
- cPanel log paths
- Install imapsync on CentOS and Ubuntu
- How to Install Resetter on Ubuntu – Linux Mint
- No response from subprocess /usr/local/cpanel/whostmgr/docroot/cgi/addon_nginx.cgi
- ImportError: No module named gi
If you like this post and wish to receive more articles from us, please like our FB page: Grepitout
Your suggestions and feedbacks will encourage us and help to improve further, please feel free to write your comments.
For more details on our services, please drop us an E-mail at info@grepitout.com
Add Comment