Apache2.4: [core:emerg] No space left on device: Couldn’t create the mpm-accept mutex

Если Вы случайно уронили Apache2.4 или он падает в ответ на какие-то действия и предоставляет похожие уведомления дружно кооперируясь с инструментами systemd:

 [core:emerg] [pid 16432] (28)No space left on device: AH00023: Couldn't create the mpm-accept mutex

[core:warn] [pid 16770] AH00098: pid file /run/httpd/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
-- Unit httpd.service has begun starting up.
May 28 17:18:30 hetzner kill[16436]: kill: cannot find process ""
May 28 17:18:30 hetzner systemd[1]: httpd.service: control process exited, code=exited status=1
May 28 17:18:30 hetzner systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

То вероятно Вам поможет небольшой трюк с ipcs:

... was failing because Apache wasn't quite starting up properly due to exhausting all the system semaphores. This was evidenced by the error message:

[Mon Oct 21 14:53:08.684987 2013] [core:emerg] [pid 490] (28)No space left on device: AH00023: Couldn't create the mpm-accept mutex

It was cleaned up using ipcs and ipcrm in a loop.

for line in `ipcs -s | grep apache | cut -d " " -f 2`; do ipcrm -s $line; done

About semaphores:

Increasing semaphore value in linux

root@hetzner-> sysctl -A | egrep sem
kernel.sem = 250        32000   32      128

root@hetzner-> ipcs -ls

------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767

Increase semop value from 32 to 100, it can be increased upto 250 which is equal to semaphores per array. Add the following line into /etc/sysctl.conf file:

kernel.sem = 250 32000 100 128


sysctl -w "kernel.sem = 250 32000 100 128"

or Value reducing your CPU usage from avg 50% to 20%

sysctl -w "kernel.sem=4096 512000 1600 2048"

kernel.sem: max_sem_per_id max_sem_total max_ops_sem_call max_sem_ids

How mu

root@hetzner-> cat /proc/sys/kernel/sem
250     32000   32      128


Scroll to top