Linux学习14-ab报错apr_pollset_poll: The timeout specified has expired (70007)
前言
使用ab压力测试时候出现报错apr_pollset_poll: The timeout specified has expired (70007),本篇总结了几个ab常见的报错和对应解决办法
当并发数过大的时候,也会出现apr_socket_recv: Connection reset by peer (104)
apr_pollset_poll
如果出现apr_pollset_poll: The timeout specified has expired (70007),主要是timeout连接超时了,可以加个-k参数,让连接KeepAlive
ab -c 10 -n 5000 http://47.104.x.x:8082/
[root@yoyo sbin]# ab -c 10 -n 5000 http://47.104.x.x:8082/
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 47.104.190.48 (be patient)
Completed 500 requests
Completed 1000 requests
Completed 1500 requests
Completed 2000 requests
Completed 2500 requests
Completed 3000 requests
Completed 3500 requests
Completed 4000 requests
Completed 4500 requests
apr_pollset_poll: The timeout specified has expired (70007)
出现原因主要是timeout连接超时了,可以加个-k参数,让连接keep-alive,另外还有-r 和-s参数也可以加上
-r Don't exit on socket receive errors. # 在遇到socket接收错误后,不退出测试
-s timeout Seconds to max. wait for each response # 最大超时时间,默认30s
Default is 30 seconds
-k Use HTTP KeepAlive feature # keep-alive保持连接
加上-k参数重新运行就不会有问题了
ab -c 10 -n 5000 -k http://47.104.x.x:81/
其它异常
当并发数设置为1000时,直接报错:apr_socket_recv: Connection reset by peer (104)
[root@yoyo sbin]# ab -c 1000 -n 10000 http://47.104.x.x:81/
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 47.104.190.48 (be patient)
apr_socket_recv: Connection reset by peer (104)
Total of 1 requests completed
当ab遇到严重的网络错误后,就会退出测试,因为这种错误说明网络存在其他问题,但是只要服务器返回数据,哪怕是数据不对,ab也会继续下去,但是会记录数据长度不对。
但事实上是:在高压力下,偶尔的一两个请求被阻止,这是一个正常的情况,特别是有防火墙或入侵检测系统的情况下,这种事情会经常发生。
那么ab有没有参数来跳过这种错误,使测试继续下去呢?
-r参数可以实现忽略这种错误,在遇到socket接收错误后,不退出测试
ab -c 10 -n 5000 -r http://47.104.x.x:81/
加上-r参数就不会遇到这种异常,中途退出了
交流QQ群:779429633
Linux学习14-ab报错apr_pollset_poll: The timeout specified has expired (70007)的更多相关文章
- Linux下Oracle11G RAC报错:在安装oracle软件时报file not found一例
Linux下Oracle11G RAC报错:在安装oracle软件时报file notfound一例 1.现象 之前安装一切都比較顺利,安装oracle软件时,进度到30%时报错:file not f ...
- linux下面重启nfs报错:nfs-server.service:main process exited
linux下面重启nfs报错:nfs-server.service:main process exited [root@dhcp-66-83-39 images]# service rpcbind s ...
- 【转载】访问IIS中网站出现 403.14 - Forbidden报错信息
将网站发布后部署到IIS后,配置完应用程序池以及相关设置项后,在浏览器中访问设置好的网站,出现403.14 - Forbidden的错误信息,从错误信息的提示来看,应该是IIS服务器此网站目录的内容被 ...
- linux 下 tomcat 运行报错 Broken pipe
linux 下 tomcat 运行报错 Broken pipe 感谢:http://hi.baidu.com/liupenglover/blog/item/4048c23ff19f1cd67d1e71 ...
- linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql.
linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql. 2013-03-04 1 ...
- Linux安装ElasticSearch启动报错的解决方法
Linux安装ElasticSearch后,ElasticSearch是不能用root用户启动的,以root用户启动会报错Refer to the log for complete error det ...
- jmeter Linux环境执行总报错 cannot allocate memory
1.windows环境写好的测试用例,执行没有问题,在Linux环境跑总是报错,提示如下 cannot allocate memory 2.一开始以为是哪块设置有问题,因为脚本里边有设置邮件自动发送, ...
- Linux下Electron loadURL报错 ERR_FAILED(-2) Not allowed to load local resource
Linux下Electron loadURL报错 ERR_FAILED(-2) Not allowed to load local resource 背景 使用electron-vue的时候,窗体创建 ...
- Linux mount挂载磁盘报错 mount: wrong fs type, bad option, bad superblock on /dev/vdb
Linux mount挂载磁盘报错 mount: wrong fs type, bad option, bad superblock on /dev/vdb Linux挂载磁盘报如下错误: moun ...
随机推荐
- HTTPS-HTTPS原理
楔子 谣言粉碎机前些日子发布的<用公共WiFi上网会危害银行账户安全吗?>,文中介绍了在使用HTTPS进行网络加密传输的一些情况,从回复来看,争议还是有的.随着网络越来越普及,应用越来越广 ...
- ERP客户关系渠管理添加和修改联系人(二十一)
树形结构treeview 前端代码: <form id="form1" runat="server"> <div> <asp:Tr ...
- Asp.Net Mvc5 结合 SignalR2.0+ 实现消息交互简单例子
Nuget添加 SignalR包 1.构建一个MyHubServer服务端类 定义类的特性标签为 [HubName("chatHub")] public class MyHubSe ...
- APIO2018酱油记
苟比主席树太难了学不会 还是把APIO几天的过程记下来吧...免得忘了 DAY -5 去CTSC的人都走了,机房好冷清...只有我.PSB.yasar.Chlience四个人 CSTC辣么难又辣么贵, ...
- fullcalendar插件日程管理
日程管理-fullcalendar插件用法 前言 本文分享fullcalendar用法,最后面提供代码下载 说到日程管理,基于JQuery的插件FullCalendar当之无愧,完整的API稳定和 ...
- element-ui 日期选择范围限制,只允许选择上下浮动一个月内的日期
<el-date-picker class="filter-item" type="daterange" value-format="yyyy- ...
- ref:spring配置数据库方式
ref:https://blog.csdn.net/alsyuan/article/details/73239240 1.使用org.springframework.jdbc.datasource.D ...
- 8.5 正睿暑期集训营 Day2
目录 2018.8.5 正睿暑期集训营 Day2 总结 A.占领地区(前缀和) B.配对(组合) C 导数卷积(NTT) 考试代码 T1 T2 T3 2018.8.5 正睿暑期集训营 Day2 时间: ...
- GDI 泄漏检测方法
方法一 1.打开电脑的[任务管理器],选择[进程]页,点击菜单项的[查看]项,选择[选择列]: 2.勾选[GDI对象(J)]即可. 3.此时,用户就可以在进程中看到每个进程对应的GDI对象,每个进程的 ...
- Linux 网络流量实时监控工具之ntopng详解
大纲一.前言二.ntopng 简介三.ntopng 功能说明 四.ntopng 安装详解五.ntopng 配置详解 六.ntopng 使用详解注,操作系统 CentOS 5.5 X86_64,软件版本 ...