免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4220 | 回复: 1
打印 上一主题 下一主题

[Web] couldn't grab the accept mutex [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-02-29 15:57 |只看该作者 |倒序浏览
couldn't grab the accept mutex

           Summary: couldn't grab the accept mutex
           Product: Apache httpd-2.0
           Version: 2.2.26
          Platform: HP
        OS/Version: HP-UX
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: All
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: [EMAIL PROTECTED]


Server version: Apache/2.0.48
OSystem version: HP-UX B.11.00 U 9000/800 unlimited-user license
During normal users activity there is this situation on my server:
root 19920     1  0 07:09:24 ?        0:01 /usr/local/apache2/bin/httpd -k start
www 19946 19920  0 07:09:45 ?         0:06 /usr/local/apache2/bin/httpd -k start
www 20199 19920  0 07:12:29 ?         0:06 /usr/local/apache2/bin/httpd -k start
www 19923 19920  0 07:09:25 ?         0:06 /usr/local/apache2/bin/httpd -k start
www 19925 19920  0 07:09:25 ?         0:08 /usr/local/apache2/bin/httpd -k start
www 19922 19920  0 07:09:25 ?         0:05 /usr/local/apache2/bin/httpd -k start
www 21517 19920  0 07:30:05 ?         0:06 /usr/local/apache2/bin/httpd -k start
www 19924 19920  0 07:09:25 ?         0:06 /usr/local/apache2/bin/httpd -k start
www 19945 19920  0 07:09:45 ?         0:06 /usr/local/apache2/bin/httpd -k start
www 19944 19920  0 07:09:44 ?         0:06 /usr/local/apache2/bin/httpd -k start
www 19921 19920  0 07:09:25 ?         0:06 /usr/local/apache2/bin/httpd -k start

after approximatly 50 minutes of activity the http process going to die and
this is the messages in APACHEHOME/logs/error_log file.

[Tue Dec 09 08:01:58 2003] [emerg] (2No space left on device: couldn't grab th
e accept mutex
[Tue Dec 09 08:01:58 2003] [alert] Child 7319 returned a Fatal error...
Apache is exiting!
[Tue Dec 09 08:01:58 2003] [emerg] (36)Identifier removed: couldn't grab the acc
ept mutex
[Tue Dec 09 08:01:58 2003] [emerg] (36)Identifier removed: couldn't grab the acc
ept mutex
[Tue Dec 09 08:01:58 2003] [emerg] (36)Identifier removed: couldn't grab the acc
ept mutex
[Tue Dec 09 08:01:58 2003] [emerg] (36)Identifier removed: couldn't grab the acc
ept mutex
[Tue Dec 09 08:01:58 2003] [emerg] (36)Identifier removed: couldn't grab the acc
ept mutex
[Tue Dec 09 08:01:58 2003] [emerg] (36)Identifier removed: couldn't grab the acc
ept mutex
[Tue Dec 09 08:01:58 2003] [emerg] (36)Identifier removed: couldn't grab the acc
ept mutex
[Tue Dec 09 08:01:59 2003] [emerg] (22)Invalid argument: couldn't grab the accep
t mutex
[Tue Dec 09 08:02:10 2003] [emerg] (22)Invalid argument: couldn't grab the accep
t mutex
[Tue Dec 09 08:02:11 2003] [emerg] (22)Invalid argument: couldn't grab the accep
ecc. ecc. for every httpd process....

i don't have any file system near 100% used space; i don't have applied any
patch of httpd (i have the most recent version); my c compiler is the cc ansi c
compile of HP-UX 11.00;
please help me

thanks

论坛徽章:
0
2 [报告]
发表于 2008-03-21 10:31 |只看该作者

问题已经解决了

我自己来解释吧,重现了apache进程运行一段时间后便自动down掉的问题,当开启apache的虚拟主机,并用压力测试工具以不同的域名去访问apache页面或登录的cgi时,errorlog里就会报“(28)No space left on device: couldn't grab the accept mutex ,(36)Identifier removed: couldn't grab the accept mutex,(22)Invalid argument: couldn't grab the accept mutex”的错误。经过试验和分析,发现apache的运行身份是nobody,在hpux中对非系统用户的动作如创建进程/线程的个数,打开文件的个数以及使用内存的多少等方面都有限制,apache 2.x版本默认使用在prefork进程处理机制,而其配置文件中针对prefork机制的其中一个参数MaxRequestsPerChild的个数默认为0(MaxRequestsPerChild的意思是:一个服务进程允许的最大请求数,也就是说,一个服务进程在处理多少个请求之后就必须要退出),为0的意思则是没有限制。这也就导致一个最低权限身份的进程在这个参数的的作用下无限制的接受请求,必定会达到一个系统上限值,这也就示在errorlog中报“couldn't grab the accept mutex”错误的原因。最后调整了MaxRequestsPerChild的个数为5个,也就是限制每个进程处理5个请求即退出,并由新产生的进程处理接下来的请求,这样进程的处理就形成了一个循环,不会超过处理个数的上线,问题就解决了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP