Fixing Apache "No space left on device: Couldn't create accept lock" errors
来源:互联网 发布:2型补偿网络 编辑:程序博客网 时间:2024/06/05 06:21
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 nsems0x00000000 68681743 apache 600 10x00000000 68714515 apache 600 10x00000000 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
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 = 4096max seg size (kbytes) = 32768max total shared memory (kbytes) = 8388608min seg size (bytes) = 1------ Semaphore Limits --------max number of arrays = 1024max semaphores per array = 250max semaphores system wide = 256000max ops per semop call = 32semaphore max value = 32767------ Messages: Limits --------max queues system wide = 1024max size of message (bytes) = 8192default max size of queue (bytes) = 16384
To change these parameters, modify the file /etc/sysctl.conf and add the following lines:
kernel.msgmni = 1024kernel.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.
- Fixing Apache "No space left on device: Couldn't create accept lock" errors
- Apache起不来,报No space left on device: Couldn't create accept lock
- Apache: No space left on device: Couldn’t create accept lock
- Apache ERROR: No space left on device: AH00023: Couldn't create the ssl-cache mutex
- No space left on device: AH00023: Couldn't create the proxy mutex 解决方法
- Can't start server: can't create PID file: No space left on device
- No space left on device: mod_rewrite: could not create rewrite_log_lock
- mysql无法启动,报错 Can't start server: can't create PID file: No space left on device
- linux磁盘空间不足:Can't start server: can't create PID file: No space left on device
- No space left on device
- No space left on device
- No space left on device
- no space left on device
- No space left on device
- No space left on device
- No space left on device
- No space left on device
- No space left on device
- 安装卸载IIS之我体验
- 关于我的博客
- 事件优先级
- 腾讯就一公共厕所,就是要对百度说Hi!
- 2008CSDN 英雄会归来
- Fixing Apache "No space left on device: Couldn't create accept lock" errors
- 点石互动--樂思蜀之:SEO参考:DIV+CSS三行两列经典布局
- DataReader 填充 DataTable
- 刚毕业时的那些糗事
- rootkit直接访问硬件之一 ----修改IOPL
- j2me手机游戏编程第一课(开发环境搭建和第一个MIDlet程序 视频)
- [学习笔记]jsp+javaBean 实现图片的上传
- 视频网站应当向政府政策靠拢
- [链接] 深入编程内幕--Visual C++