apache ab 测试 apr_socket_connect(): 由于目标机器积极拒绝 无法连接
2014-04-26 10:05
411 查看
遇到这种情况一般是你开的并行数量太多了。。。例如:ab -c 1000 -n 10000 http://localhost/index.html 如此大的请求就会挂掉,不过还是有补救措施的,可以通过增加并发数上限解决这个问题,步骤如下:
1、停止Apache服务;
2、找到apache/conf/httpd.conf文件,用文本编辑器打开找到这两行:
# Server-pool management (MPM specific)
# Include conf/extra/httpd-mpm.conf
把第二行include........这行的注释去掉。
3、找到apache/conf/extra/httpd-mpm.conf文件,打开,找到:
<IfModule mpm_winnt_module>
ThreadsPerChild 150
MaxRequestsPerChild 0
</IfModule>
把上面的150调大,Windows下最大为1920.
注意:尖括号里的名字是winnt,不要看错了
4、重新启动Apache服务.
1、停止Apache服务;
2、找到apache/conf/httpd.conf文件,用文本编辑器打开找到这两行:
# Server-pool management (MPM specific)
# Include conf/extra/httpd-mpm.conf
把第二行include........这行的注释去掉。
3、找到apache/conf/extra/httpd-mpm.conf文件,打开,找到:
<IfModule mpm_winnt_module>
ThreadsPerChild 150
MaxRequestsPerChild 0
</IfModule>
把上面的150调大,Windows下最大为1920.
注意:尖括号里的名字是winnt,不要看错了
4、重新启动Apache服务.
相关文章推荐
- apache ab 测试 apr_socket_connect(): 由于目标机器积极拒绝 无法连接
- Ubuntu13.10源码安装Apache2.4
- root权限启动apache报错
- php+apache+mysql+discuz+nat123搭建并发布论坛网站
- php+apache+mysql+wordpress+nat123搭建并发布个人博客网站
- 【Django】Apache上运行多个Django项目
- ubuntu 的apache2 配置文件引用
- 使用apache common-io 监控文件变化--转
- apache kafka系列之replication设计机制
- apache kafka系列之log4j配置
- Ubuntu 10.04下SVN+Apache安装、配置与使用
- Win7 环境 Apache2.2.x与Subversion 1.8.8 结合搭建版本控制环境
- apache2 添加perl支持
- apache更改端口后无法启动成功的解决方案
- pylogsparser 解析apache的日志
- 启动Struts2时报错:java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
- Apache 403 Forbidden 解决办法
- apache spark在windows7 下安装
- Apache的配置
- java.lang.UnsupportedClassVersionError orgapachecatalinastartupBootstrap的原因