Apache: No space left on device: Couldn’t create accept lock
Apache: No space left on device: Couldn’t create accept lock
However there is free disk space on the server.
Looks like socket issue. Apache uses them so parent and child processes can communicate. Using the ipcs -a command, you can see a list of all the semaphores that were causing the problem.
[root@localhost ~]# ipcs -a ------ Shared Memory Segments -------- key shmid owner perms bytes nattch status 0x6c030690 98304 zabbix 600 527280 6 ------ Semaphore Arrays -------- key semid owner perms nsems 0x00000000 0 root 600 1 0x00000000 32769 root 600 1 0x00000000 4980738 apache 600 1 0x00000000 5013507 apache 600 1 0x7a030690 29261828 zabbix 600 13 0x530310b0 18219013 root 600 103 0x480310b0 18251782 root 600 9
The following command can be used in CentOS/RHEL to clear all of the apache-related semaphores.
for i in `ipcs -s | awk '/apache/ {print $2}'`; do (ipcrm -s $i); done ipcrm -m 0x63637069
Now you can try restarting Apache and all done.
[root@localhost httpd]# service httpd start Starting httpd: [ OK ]