日期:2014-05-16  浏览次数:21031 次

通过apache访问redmine,出现错误Apache:Server ran out of threads to serve requests.

今天,管理员发送消息,说redmine突然无法访问,简要说下我们公司的redmine搭建情况:

?

系统架设

前台采用apache2.2作为web服务器

后台架设了3000,3001,3002,三个mongrol应用

?

?

问题表现

访问http://localhost,出现一直在访问服务器;

?

然后访问http://localhost:3000可以正常访问,估计问题出现apache上,查看错误日志error.log

?

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文件的修改,然后重启服务器,可以正常访问,问题解决

?

作者:无名程序员

微博:weibo.com/wmcxy

blog:wmcxy.iteye.com

转载请注明原作者,谢谢配合!