请帮助一些关于这个Apache服务器崩溃的想法:
这是我的MPMconfiguration和错误
<IfModule prefork.c> StartServers 5 MinSpareServers 30 MaxSpareServers 40 ServerLimit 950 MaxClients 950 MaxRequestsPerChild 2000 </IfModule> [Sun Sep 09 03:08:03 2012] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.16 mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured -- resuming normal operations [Mon Sep 10 17:26:47 2012] [error] [mod_pagespeed 0.10.22.4-1633 @5088] [0910/172647:ERROR:worker.cc(120)] Unable to start worker thread [Mon Sep 10 17:26:48 2012] [error] [mod_pagespeed 0.10.22.4-1633 @4983] [0910/172648:ERROR:worker.cc(120)] Unable to start worker thread [Mon Sep 10 17:26:48 2012] [error] [mod_pagespeed 0.10.22.4-1633 @4915] [0910/172648:ERROR:worker.cc(120)] Unable to start worker thread [Mon Sep 10 17:26:49 2012] [alert] (11)Resource temporarily unavailable: setuid: unable to change to uid: 48 [Mon Sep 10 17:26:49 2012] [error] [mod_pagespeed 0.10.22.4-1633 @5095] [0910/172649:ERROR:worker.cc(120)] Unable to start worker thread [Mon Sep 10 17:26:49 2012] [error] [mod_pagespeed 0.10.22.4-1633 @5085] [0910/172649:ERROR:worker.cc(120)] Unable to start worker thread [Mon Sep 10 17:26:49 2012] [error] [mod_pagespeed 0.10.22.4-1633 @4989] [0910/172649:ERROR:worker.cc(120)] Unable to start worker thread [Mon Sep 10 17:26:50 2012] [alert] Child 5108 returned a Fatal error... Apache is exiting! [Mon Sep 10 17:26:50 2012] [emerg] (22)Invalid argument: couldn't grab the accept mutex [Mon Sep 10 17:26:50 2012] [emerg] (22)Invalid argument: couldn't release the accept mutex [Mon Sep 10 17:26:50 2012] [emerg] (22)Invalid argument: couldn't release the accept mutex [Mon Sep 10 17:26:50 2012] [emerg] (22)Invalid argument: couldn't grab the accept mutex [Mon Sep 10 17:26:50 2012] [emerg] (22)Invalid argument: couldn't grab the accept mutex [Mon Sep 10 17:26:50 2012] [emerg] (22)Invalid argument: couldn't release the accept mutex
最相关的错误似乎是:
[Mon Sep 10 17:26:49 2012] [alert] (11)Resource temporarily unavailable: setuid: unable to change to uid: 48
事情从那里走下坡路。
这意味着Apache达到了允许运行的最大进程数限制。
您可以通过运行ulimit -u来查看限制。 要增加限制,运行ulimit -u <number>或者编辑/etc/security/limits.conf (可能是Red Hat特有的),并为Apache的用户添加一个configuration指令,将nproc的值增加到更合理的值。
你也可以尝试减lessApache的ServerLimit和MaxClients指令。
下面是一篇很好的文章,解释了RHEL6如何通过在/etc/security/limits.d/90-nproc.conf中添加1024限制来解决最大进程问题(“help ulimit”显示-u是“最大用户进程数”) ,作者说他刚刚评论说: http : //kavassalis.com/2011/03/linux-and-the-maximum-number-of-processes-threads/
这里是讨论它的红帽Bugzilla页面: https ://bugzilla.redhat.com/show_bug.cgi?id =432903