CentOS - apache: (28)No space left on device: Couldn't create accept lock (/etc/httpd/logs/accept.lock) (5)


Материал из Wiki - Iphoster - 'the best ever hosting and support

Перейти к: навигация, поиск

Самые выгодные сервера‎


Ошибка Apache: No space left on device: Couldn't create accept lock

[root@serv /]# tail -f /var/log/httpd/error_log
[Fri Oct 24 08:25:10 2014] [notice] Digest: done
[Fri Oct 24 08:25:10 2014] [notice] mod_ruid2/0.9.4 enabled
[Fri Oct 24 08:25:10 2014] [warn] pid file /etc/httpd/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Fri Oct 24 08:25:10 2014] [emerg] (28)No space left on device: Couldn't create accept lock (/etc/httpd/logs/accept.lock.12893) (5)
[Fri Oct 24 08:26:40 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Oct 24 08:26:40 2014] [notice] Digest: generating secret for digest authentication ...
[Fri Oct 24 08:26:40 2014] [notice] Digest: done
[Fri Oct 24 08:26:40 2014] [notice] mod_ruid2/0.9.4 enabled
[Fri Oct 24 08:26:40 2014] [warn] pid file /etc/httpd/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Fri Oct 24 08:26:40 2014] [emerg] (28)No space left on device: Couldn't create accept lock (/etc/httpd/logs/accept.lock.12907) (5)

либо такая ошибка No space left on device: Cannot create SSLMutex

[Thu Jan 15 12:41:41 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Jan 15 12:41:41 2015] [error] (28)No space left on device: Cannot create SSLMutex
Configuration Failed


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

[root@serv /]# ipcs -s
------ Semaphore Arrays --------
key        semid      owner      perms      nsems
0x00000000 0          root       600        1
0x00000000 32769      apache     600        1
0x00000000 65538      apache     600        1
0x00000000 98307      apache     600        1
0x00000000 131076     apache     600        1
0x00000000 163845     apache     600        1
0x00000000 196614     apache     600        1
0x00000000 229383     apache     600        1
0x00000000 262152     apache     600        1
0x00000000 294921     apache     600        1
0x00000000 327690     apache     600        1
0x00000000 360459     apache     600        1
0x00000000 393228     apache     600        1
0x00000000 425997     apache     600        1
0x00000000 458766     apache     600        1
0x00000000 491535     apache     600        1
0x00000000 524304     apache     600        1
0x00000000 557073     apache     600        1
0x00000000 589842     apache     600        1
0x00000000 622611     apache     600        1
0x00000000 655380     apache     600        1
0x00000000 688149     apache     600        1
0x00000000 720918     apache     600        1
0x00000000 753687     apache     600        1
0x00000000 786456     apache     600        1
0x00000000 819225     apache     600        1
0x00000000 851994     apache     600        1
0x00000000 884763     apache     600        1
0x00000000 917532     apache     600        1
0x00000000 950301     apache     600        1
0x00000000 983070     apache     600        1
0x00000000 1015839    apache     600        1
0x00000000 1048608    apache     600        1  


Решение:
Чистим семафоры:

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

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

[root@serv /]# vi /etc/sysctl.conf
kernel.msgmni = 1024
kernel.sem = 250 256000 32 1024
[root@serv /]# sysctl -p
Индекс цитирования