Apache: No space left on device: Couldn’t create accept lock
When dealing with mem leaks in my mod_php apps I ran into a curious apache problem.
After a while apache could not be started but failed with strange errors like:
[emerg] (28)No space left on device: Couldn't create accept lock (/var/lock/apache2/accept.lock.11180) (5)
There was definitely enough space on the device where the locks are stored (default /var/lock/apache2/). I tried to explicetely different Lockfiles using the LockFile directive but this did not help. Only reboot of the system helped out of my crisis.
Solution
# ipcs -s | grep www-data
If you see a list of semaphores, Apache has not cleaned up after itself, and some semaphores are stuck.
Removing this semaphores immediately solved the problem
# for i in `ipcs -s | awk '/www-data/ {print $2}'`; do (ipcrm -s $i); done
Now, in almost all cases, Apache should start properly. If it doesn’t, you may just be completely out of available semaphores. You may want to increase your available semaphores, and you’ll need to tickle your kernel to do so. Add this to /etc/sysctl.conf:
kernel.sem = 250 256000 32 1024
And then run sysctl -p to pick up the new changes.
thx skif@
Читайте також:
- Wrong charset, conversion from `utf-8' to `windows-1251' is not allowed chroot
- Назва сайту з www чи без?
- Встановлення php модуля до веб-сервера apache на OpenBSD
- Linux Tuning Parameters
- Howto install and use usb modem, as example "mts connect", in debian linux
- /usr/bin/ld: cannot find -lstdc++ Debian libreadline5-dev package bug
- Пошук великих файлів, find, ls, du
- How To Integrate ClamAV Into PureFTPd For Virus Scanning On Debian
- How To quick generate openssl certificate signing request
- debian + opera