Устранение ошибки No space left on device при запуске httpd

Исправление ошибки “No space left on device: Couldn’t create accept lock (/etc/httpd/logs/accept.lock)”

Ошибка httpd

[Fri Feb 06 03:51:02 2015] [warn] pid file /etc/httpd/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Fri Feb 06 03:51:02 2015] [emerg] (28)No space left on device: Couldn't create accept lock (/etc/httpd/logs/accept.lock.12012) (5)
[Fri Feb 06 03:52:06 2015] [warn] pid file /etc/httpd/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Fri Feb 06 03:52:06 2015] [emerg] (28)No space left on device: Couldn't create accept lock (/etc/httpd/logs/accept.lock.12157) (5)
[Fri Feb 06 04:18:36 2015] [emerg] (28)No space left on device: Couldn't create accept lock (/etc/httpd/logs/accept.lock.14124) (5)
[Fri Feb 06 04:20:47 2015] [emerg] (28)No space left on device: Couldn't create accept lock (/etc/httpd/logs/accept.lock.14366) (5)
[Fri Feb 06 04:20:48 2015] [emerg] (28)No space left on device: Couldn't create accept lock (/etc/httpd/logs/accept.lock.14381) (5)
[Fri Feb 06 04:21:13 2015] [warn] pid file /etc/httpd/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Fri Feb 06 04:21:13 2015] [emerg] (28)No space left on device: Couldn't create accept lock (/etc/httpd/logs/accept.lock.14414) (5)
[Fri Feb 06 04:22:00 2015] [emerg] (28)No space left on device: Couldn't create accept lock (/etc/httpd/logs/accept.lock.14447) (5)
  1. Проверить доступное место на диске командой df -h
  2. Проверить квоту repquota /
  3. Произвести очистку открытых семафоров

Смотрим выделяемые семафоры

# [root@test /]# ipcs -s
------ Массивы семафоров --------
ключ semid владелец права nsems
0x00000000 0 root 600 1
0x00000000 32769 root 600 1
0x000000a7 65538 root 600 1
0x00000000 622595 4294967295 600 1
0x00000000 1540100 4294967295 600 1
0x00000000 1572869 4294967295 600 1
0x7a010339 196614 zabbix 600 9
0x00000000 229383 4294967295 600 1
0x00000000 262152 4294967295 600 1
0x00000000 327689 4294967295 600 1
0x00000000 360458 4294967295 600 1
0x00000000 425995 4294967295 600 1
0x00000000 458764 4294967295 600 1
0x00000000 491533 4294967295 600 1
0x00000000 524302 4294967295 600 1
0x00000000 557071 4294967295 600 1
0x00000000 589840 4294967295 600 1
0x00000000 655377 4294967295 600 1
0x00000000 1048594 4294967295 600 1
0x00000000 720915 4294967295 600 1
0x00000000 753684 4294967295 600 1
0x00000000 819221 4294967295 600 1
0x00000000 851990 4294967295 600 1
0x00000000 917527 4294967295 600 1
0x00000000 950296 4294967295 600 1
0x00000000 983065 4294967295 600 1
0x00000000 1015834 4294967295 600 1
0x00000000 1081371 4294967295 600 1
0x00000000 4816924 4294967295 600 1
0x00000000 1146909 4294967295 600 1
0x00000000 1179678 4294967295 600 1
0x00000000 1212447 4294967295 600 1
0x00000000 1245216 4294967295 600 1
0x00000000 1277985 4294967295 600 1
0x00000000 1310754 4294967295 600 1
0x00000000 1376291 4294967295 600 1
0x00000000 1409060 4294967295 600 1
0x00000000 1474597 4294967295 600 1
0x00000000 1507366 4294967295 600 1
0x00000000 1638439 4294967295 600 1
0x00000000 1671208 4294967295 600 1
0x00000000 1703977 4294967295 600 1
0x00000000 1736746 4294967295 600 1
0x00000000 1802283 4294967295 600 1
0x00000000 1835052 4294967295 600 1
0x00000000 1900589 4294967295 600 1
0x00000000 1933358 4294967295 600 1
0x00000000 1966127 4294967295 600 1
0x00000000 1998896 4294967295 600 1
0x00000000 2031665 4294967295 600 1
0x00000000 2064434 4294967295 600 1
0x00000000 2097203 4294967295 600 1
0x00000000 2129972 4294967295 600 1
0x00000000 2162741 4294967295 600 1
0x00000000 2195510 4294967295 600 1
0x00000000 2228279 4294967295 600 1
0x00000000 2261048 4294967295 600 1
0x00000000 2293817 4294967295 600 1
0x00000000 2326586 4294967295 600 1
0x00000000 2359355 4294967295 600 1
0x00000000 2392124 4294967295 600 1
0x00000000 2457661 4294967295 600 1
0x00000000 2490430 4294967295 600 1
0x00000000 2555967 4294967295 600 1
0x00000000 2588736 4294967295 600 1
0x00000000 2621505 4294967295 600 1
0x00000000 2654274 4294967295 600 1
0x00000000 2687043 4294967295 600 1
0x00000000 2719812 4294967295 600 1
0x00000000 2752581 4294967295 600 1
0x00000000 2785350 4294967295 600 1
0x00000000 2818119 4294967295 600 1
0x00000000 2850888 4294967295 600 1
0x00000000 2883657 4294967295 600 1
0x00000000 2916426 4294967295 600 1
0x00000000 2949195 4294967295 600 1
0x00000000 2981964 4294967295 600 1
0x00000000 3014733 4294967295 600 1
0x00000000 3047502 4294967295 600 1
0x00000000 3145807 4294967295 600 1
0x00000000 3178576 4294967295 600 1
0x00000000 3211345 4294967295 600 1
0x00000000 3244114 4294967295 600 1
0x00000000 3276883 4294967295 600 1
0x00000000 3309652 4294967295 600 1
0x00000000 3342421 4294967295 600 1
0x00000000 3375190 4294967295 600 1
0x00000000 3407959 4294967295 600 1
0x00000000 3440728 4294967295 600 1
0x00000000 3473497 4294967295 600 1
0x00000000 3506266 4294967295 600 1
0x00000000 3539035 4294967295 600 1
0x00000000 3571804 4294967295 600 1
0x00000000 3604573 4294967295 600 1
0x00000000 3637342 4294967295 600 1
0x00000000 3670111 4294967295 600 1
0x00000000 3702880 4294967295 600 1
0x00000000 3735649 4294967295 600 1
0x00000000 3768418 4294967295 600 1
0x00000000 3801187 4294967295 600 1
0x00000000 3833956 4294967295 600 1
0x00000000 3866725 4294967295 600 1
0x00000000 3899494 4294967295 600 1
0x00000000 3932263 4294967295 600 1
0x00000000 3965032 4294967295 600 1
0x00000000 3997801 4294967295 600 1
0x00000000 4030570 4294967295 600 1
0x00000000 4063339 4294967295 600 1
0x00000000 4096108 4294967295 600 1
0x00000000 4849773 4294967295 600 1
0x00000000 4882542 4294967295 600 1
0x00000000 4194415 4294967295 600 1
0x00000000 4227184 4294967295 600 1
0x00000000 4292721 4294967295 600 1
0x00000000 4325490 4294967295 600 1
0x00000000 4358259 4294967295 600 1
0x00000000 4391028 4294967295 600 1
0x00000000 4423797 4294967295 600 1
0x00000000 4456566 4294967295 600 1
0x00000000 4522103 4294967295 600 1
0x00000000 4554872 4294967295 600 1
0x00000000 4587641 4294967295 600 1
0x00000000 4620410 4294967295 600 1
0x00000000 4653179 4294967295 600 1
0x00000000 4685948 4294967295 600 1
0x00000000 4718717 4294967295 600 1
0x00000000 4751486 4294967295 600 1
0x00000000 4784255 4294967295 600 1

Решение

Чистим семафоры

# for i in `ipcs -s | awk '/httpd/ {print $2}'`; do (ipcrm -s $i); done

Увеличиваем количество выделяемых семафоров

# vi /etc/sysctl.conf
kernel.msgmni = 1024
kernel.sem = 250 256000 32 1024

Перезагружаем sysctl

# sysctl -p

И перезапускаем сервис httpd

service httpd restart
Поделиться Комментарии