码迷,mamicode.com
首页 > Web开发 > 详细

Apache问题处理

时间:2016-11-22 13:09:46      阅读:176      评论:0      收藏:0      [点我收藏+]

标签:链接   apach   百度   name   参数   http   art   ror   min   

1. 查看apache的错误日志

我的apache日志文件目录 /var/log/httpd/error.log

[Sun Nov 20 21:17:24 2016] [error] server reached MaxClients setting, consider raising the MaxClients setting 出现问题

2. 百度上面的问题 是因为原来是到了apache的最大连接数了。

检查了一下,这是由于并发链接数太多导致的,后来查了一下apache的文档,发现可以通过修改apache的配置文

/etc/httpd/conf/httpd.conf中的MaxClients参数来调整。

然后在httpd.conf里面配置

<IfModule prefork.c>  

  StartServers     100  

  MinSpareServers  100  

  MaxSpareServers  100  

  ServerLimit     1024  

  MaxClients      1024  

  MaxRequestsPerChild  4000  

</IfModule>  

3. 从这个问题学到了很多关于apache的问题,工作模式,但是我的线上服务器切换老是报错就不敢切换了,

Apache问题处理

标签:链接   apach   百度   name   参数   http   art   ror   min   

原文地址:http://www.cnblogs.com/shaoshao/p/6088415.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!