打印本文 打印本文 关闭窗口 关闭窗口
apache日志文件,出现错误Apache:Server ran out of threads to serve requests.
作者:佚名  文章来源:本站原创  点击数1979  更新时间:2012/6/8 14:20:31  文章录入:mintao  责任编辑:mintao

有一台只装了APACHE的服务器最近老是出问题,apache日志文件,出现错误Apache:Server ran out of threads to serve requests.,后来看了一下日志文件,闵涛才发现,原来是线程数没有进行设置.

问题表现

访问服务器上的网站无法访问,可以远程连接服务器;

apache后台出现的错误提示:

 

[warn] Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting

 

 

原因:

在httpd.conf中并没有设置线程数量,Apache默认开启了64个,看来是远远不够。于是上网一查,在httpd.conf加入以下内容:

<IfModule mpm_winnt_module>
ThreadsPerChild 512
MaxRequestsPerChild 0
</IfModule>

这样开启了512工作线程。这个值根据需要可能要慢慢调整

按照上面的修改进行httpd。conf文件的修改,然后重启服务器,可以正常访问,问题解决

打印本文 打印本文 关闭窗口 关闭窗口