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作者: wllhc 时间: 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个请求即退出,并由新产生的进程处理接下来的请求,这样进程的处理就形成了一个循环,不会超过处理个数的上线,问题就解决了