大佬教程收集整理的这篇文章主要介绍了linux – Apache性能问题,在“1000 total children”之后,Apache不再响应HTTP请求.不是MaxClients问题?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
在CentOS 5.8上运行Apache 2.2.3 mod_PHP.
在流量很大的每一天,我们都遇到了Apache不再响应任何http请求的问题.
它听起来像是一个标准的MaxClients问题,但似乎并非如此.
此外,在此期间登录到机器的负载平均值低于1,并且仍然有足够的RAM可用.
查看/ var / log / httpd / error_log我注意到以下模式:
[Mon Apr 30 07:00:34 2012] [info] server seems busy,(you may need to increaseStartServers,or Min/MaxSpareServers),spawning 32 children,there are 0 idle,and 905 @R_755_10586@l children [Mon Apr 30 07:00:35 2012] [info] server seems busy,(you may need to increase StartServers,and 937 @R_755_10586@l children [Mon Apr 30 07:00:36 2012] [info] server seems busy,and 969 @R_755_10586@l children [Mon Apr 30 07:00:37 2012] [info] server seems busy,there are 35 idle,and 1001 @R_755_10586@l children [Mon Apr 30 07:00:42 2012] [debug] mpm_common.c(663): (70007)The timeout specified has expired: connect to listener on [::]:80 <br> [Mon Apr 30 07:00:49 2012] [debug] mpm_common.c(663): (70007)The timeout specified has expired: connect to listener on [::]:80 <br> [Mon Apr 30 07:00:56 2012] [debug] mpm_common.c(663): (70007)The timeout specified has expired: connect to listener on [::]:80 <br> [Mon Apr 30 07:01:03 2012] [debug] mpm_common.c(663): (70007)The timeout specified has expired: connect to listener on [::]:80 <br>
每天几次,在1000名儿童之后,Apache停止响应并且必须重新启动以便再次工作.
我已经回顾了几周前的error_log,它是相同的模式,服务器击中了1000个孩子,然后立即吐出
[debug] mpm_common.c(663):( 70007)指定的超时已到期:连接到[::]:80错误消息上的监听器并停止响应.
然而,服务器上的负载非常低……
即使我尝试请求一个简单的index.html文件,它也会超时.
以下是配置中的相关部分:
Timeout 45 KeepAlive On MaxKeepAliverequests 10000 KeepAliveTimeout 3 <IfModule prefork.c> StartServers 80 MinSpareServers 50 MaxSpareServers 120 ServerLimit 3500 MaxClients 3500 MaxrequestsPerChild 2000 </IfModule>
任何人都知道为什么在停止处理更多请求之前Apache能够达到的神奇数量为1000?
或者如何理解(70007)指定的超时已过期:连接到[::]:80消息上的监听器?
指的是什么“超时指定”?
我仔细检查了Max Open Files,它之前是1024,但现在是16384,仍然是同样的问题.
您可以轻松验证这是否是access.log中的问题:您应该在很短的时间内收到服务器IP地址的大量请求.这有效,直到您点击MaxClients设置或直到您的系统资源耗尽.唯一的解决方法是修复有问题的PHP程序.
以上是大佬教程为你收集整理的linux – Apache性能问题,在“1000 total children”之后,Apache不再响应HTTP请求.不是MaxClients问题?全部内容,希望文章能够帮你解决linux – Apache性能问题,在“1000 total children”之后,Apache不再响应HTTP请求.不是MaxClients问题?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。