Fixing Apache "No space left on device: Couldn't create accept lock" errors
2008-03-30 22:48
453 查看
Fixing Apache "No space left on device: Couldn't create accept lock" errors
Error Message: When starting Apache, I get this error message in the main Apache error_log:[emerg] (28)No space left on device: Couldn't create accept lock [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [notice] Digest: generating secret for digest authentication ... [notice] Digest: done [warn] pid file /etc/httpd/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run? [emerg] (28)No space left on device: Couldn't create accept lock
First off, check to make sure that you really aren't out of disk space, or have hit a quota limit. Another way that Apache can create the "accept lock" is with a semaphore. A semaphore is an inter-process communication tool that is used by Apache to communicate with it's child processes. This error message may mean that Apache couldn't create a new semaphore.
Check to see how many semaphores are currently in use. If Apache is running correctly, you should see something like this:
# ipcs -s ------ Semaphore Arrays -------- key semid owner perms nsems 0x00000000 68681743 apache 600 1 0x00000000 68714515 apache 600 1 0x00000000 68747291 apache 600 1
If Apache is stopped, and you still see these semaphores, then you can safely kill them by running this command for each semaphore id (in the second column)
$ ipcrm -s <semid>
To destroy all semaphores, you can run this from the command line (with "apache" being the apache-user):
for semid in `ipcs -s | grep apachec | cut -f2 -d" "`; do ipcrm -s $semid; done
[edit]
If you are out of semaphores
If you can't create any more semaphores:Sometimes your system may need to increase the number of semaphores that are available on the system. This requires a change to a kernel parameter. If you are running on a virtual server and cannot modify kernel parameters, you may need to ask your hosting provider to change this parameter on their host server To view the current parameters:
# ipcs -l ------ Shared Memory Limits -------- max number of segments = 4096 max seg size (kbytes) = 32768 max total shared memory (kbytes) = 8388608 min seg size (bytes) = 1 ------ Semaphore Limits -------- max number of arrays = 1024 max semaphores per array = 250 max semaphores system wide = 256000 max ops per semop call = 32 semaphore max value = 32767 ------ Messages: Limits -------- max queues system wide = 1024 max size of message (bytes) = 8192 default max size of queue (bytes) = 16384
To change these parameters, modify the file /etc/sysctl.conf and add the following lines:
kernel.msgmni = 1024 kernel.sem = 250 256000 32 1024
Then load these settings with the command:
sysctl -p
Your Apache process should now be able to create the needed semaphores and run properly.
相关文章推荐
- Due to "No space left on device", Many Concurrent Manager are under 'No Manager' Status
- Ramdisk 上的 "No space left on device" 问题
- Perl ERROR "Failure to create message queue, No space left on device "
- Ramdisk 上的 "No space left on device" 问题 .
- 修改 docker image 安装目录 (解决加载大image时报错:"no space left on device")
- Apache ERROR: No space left on device: AH00023: Couldn't create the ssl-cache mutex
- boot2docker里报"no space left on device" error的解决方法
- Apache启动不了,报错信息:No space left on device
- Linux内核更新,解决"gzip: stdout: No space left on device"问题
- Hadoop streaming: Exception in thread "main" java.io.IOException: No space left on device
- Linux XFS: "no space left on device"
- Apache: No space left on device: Couldn’t create accept lock
- Apache启动No space left on device及Linux信号量初探
- Linux下Apache重启遇到No space left on device错误的解决方法
- Linux内核更新,解决"gzip: stdout: No space left on device"问题
- Apache No space left on device的解决办法
- Docker error : "/sys/fs/cgroup/memory/xxxx" "no space left on device"
- 启动Apache时提示No space left on device
- apache (28)No space left on device: AH00023: Couldn't create the ssl-cache mutex
- Apache No space left on device: mod_rewrite: could not create rewrite_log_lock Configuration Failed