最近使用LoadRunner进行Winsock协议的性能测试时,测试的WebServer是JBoss,经常出现10053错误,现象如下:当我用lrs_create_socket创建连接之后,当这个socket连接的请求次数达到100次后,这个连接就不可用了,必须close后再重新create。LoadRunner提示错误:Error : socket0 - Software caused connection abort. Error code : 10053.

经过多次探索,终于发现该错误是由于Apach HTTPServer中HTTP 1.1 版本KeepAlive参数 的配置原因导致的。从我对多个不同WebServer的测试结果来看,在一个Socket连接进行100个请求时出错的有JBoss和Tomcat,其它Web服务器如IIS、WebLogic均没有该问题。
下面介绍几个相关的参数:KeepAlive 、KeepAliveTimeout、MaxKeepAliveRequests。

KeepAlive Directive
Description: Enables HTTP persistent connections
Syntax: KeepAlive On|Off
Default: KeepAlive On
Context: server config, virtual host
Status: Core
Module: core

在HTTP 1.0中,一次连接只能作传输一次HTTP请求,而KeepAlive参数用于支持HTTP 1.1版本的一次连接、多次传输功能,这样就可以在一次连接中传递多个HTTP请求。虽然只有较新的浏览器才支持这个功能,但还是打开使用这个选项。

The Keep-Alive extension to HTTP/1.0 and the persistent connection feature of HTTP/1.1 provide long-lived HTTP sessions which allow multiple requests to be sent over the same TCP connection. In some cases this has been shown to result in an almost 50% speedup in latency times for HTML documents with many images. To enable Keep-Alive connections, set KeepAlive On.

For HTTP/1.0 clients, Keep-Alive connections will only be used if they are specifically requested by a client. In addition, a Keep-Alive connection with an HTTP/1.0 client can only be used when the length of the content is known in advance. This implies that dynamic content such as CGI output, SSI pages, and server-generated directory listings will generally not use Keep-Alive connections to HTTP/1.0 clients. For HTTP/1.1 clients, persistent connections are the default unless otherwise specified. If the client requests it, chunked encoding will be used in order to send content of unknown length over persistent connections.

----------------------

KeepAliveTimeout Directive
Description: Amount of time the server will wait for subsequent requests on a persistent connection
Syntax: KeepAliveTimeout seconds
Default: KeepAliveTimeout 15
Context: server config, virtual host
Status: Core
Module: core

KeepAliveTimeout测试一次连接中的多次请求传输之间的时间,如果服务器  已经完成了一次请求,但一直没有接收到客户程序的下一次请求,在间隔超过了  这个参数设置的值之后,服务器就断开连接。

The number of seconds Apache will wait for a subsequent request before closing the connection. Once a request has been received, the timeout value specified by the Timeout directive applies.

Setting KeepAliveTimeout to a high value may cause performance problems in heavily loaded servers. The higher the timeout, the more server processes will be kept occupied waiting on connections with idle clients.

----------------------

MaxKeepAliveRequests Directive
Description: Number of requests allowed on a persistent connection
Syntax: MaxKeepAliveRequests number
Default: MaxKeepAliveRequests 100
Context: server config, virtual host
Status: Core
Module: core

MaxKeepAliveRequests为一次连接可以进行的HTTP请求的最大请求次数。将其值设为0将支持在一次连接内进行无限次的传输请求。事实上没有客户程序在一次连接中请求太多的页面,通常达不到这个上限就完成连接了。

The MaxKeepAliveRequests directive limits the number of requests allowed per connection when KeepAlive is on. If it is set to 0, unlimited requests will be allowed. We recommend that this setting be kept to a high value for maximum server performance.

For example:MaxKeepAliveRequests 500

最后,虽然这个问题是由于HTTPServer的参数配置引起的,但只有LoadRunner才会出现这个问题,如果用Rational Robot实现同样的功能则没有该问题,由此估计和测试工具对Socket连接的实现策略也有一定的关系。

转载于:https://www.cnblogs.com/pent/archive/2007/03/31/694903.html

LoadRunner Winsock 10053错误的真正原因相关推荐

  1. socket 10053 错误

    最近在写一个http服务器,使其能支持windows media player播放mp4文件.开发过程中,调用send 函数后有时候出现100053错误. baidu了一下,主要原因如下: 一 出现1 ...

  2. linux 下搭建yolov3错误,yolov3---报段错误的可能原因及解决方法

    参考: ************************************************************************************************ ...

  3. Delphi 通信报Asynchronous socket error 10053错误的一个解决方法

    在使用Delphi中的TClientSocket和TServerSocket进行通信编程时,当使用TClientSocket这方的客户端使用TClientSocket.close断开连接并退出程序时, ...

  4. java 主动抛出 段错误_段错误产生的原因~

    原文:https://blog.csdn.net/qq_29350001/article/details/53780697 一.什么是段错误? 一旦一个程序发生了越界访问,cpu 就会产生相应的保护, ...

  5. Linux环境下段错误的产生原因及调试方法小结

    From:http://www.cnblogs.com/panfeng412/archive/2011/11/06/2237857.html 最近在Linux环境下做C语言项目,由于是在一个原有项目基 ...

  6. c语言unused variable错误,这个错误可能的原因是你忘了初始化变量

    已结贴√ 问题点数:20 回复次数:2 这个错误可能的原因是你忘了初始化变量 function EMDGETK %计算Argon热传导系数 %采用快速Fouie变换求解EMD算法得到的热传导系数 %r ...

  7. 转Linux环境下段错误的产生原因及调试方法小结

    Linux环境下段错误的产生原因及调试方法小结 转载于:https://www.cnblogs.com/objectDetect/p/7575659.html

  8. ios开发两个简单的错误提示和原因

    两个简单的错误提示和原因 在使用iTunes Connect上传时出现Info.plist does not contain a CFBundleResourceSpecification这样的错误时 ...

  9. [转]Linux环境下段错误的产生原因及调试方法小结

    最近在Linux环境下做C语言项目,由于是在一个原有项目基础之上进行二次开发,而且项目工程庞大复杂,出现了不少问题,其中遇到最多.花费时间最长的问题就是著名的"段错误"(Segme ...

最新文章

  1. linux安装软件不同用户名密码,Linux的安装和基本命令
  2. 面试题总结16 对一个整数开根号
  3. 2014.12.10 OC基础复习
  4. 一种抑制undershoot/overshoot锐化算法介绍
  5. Kali下JDK1.8的安装过程
  6. 使用pycharm配置flask项目,并使用git进行版本控制
  7. php声明js变量类型,js中变量是什么以及有哪些类型
  8. 编程入门指南 v1.4
  9. 适应关键业务环境的加湿系统
  10. 交互式反汇编器专业版IDA Pro的一点介绍
  11. AcWing 852. spfa判断负环(spfa or bellman)
  12. 如何做数据库分页查询
  13. 2020蓝桥杯省赛模拟赛
  14. rxbus 源码_关于RxBus实现方式的思考
  15. 【打卡算法】 26、删除有序数组中的重复项 算法解析
  16. 360怎么修改域名服务器地址,怎样修改DNS地址
  17. 在python中设置静态变量
  18. 硬件-3-家庭联网常用设备
  19. Linux远程登陆到Linux服务器
  20. 协方差,协方差矩阵,矩阵特征值

热门文章

  1. excel单元格加引号及逗号,转换为sql需要的样式
  2. registry ---------仓库 -----------------镜像
  3. Zend Framework Mail通过网易免费邮箱发送邮件
  4. redis之 centos 6.7 下安装 redis-3.2.5
  5. SAP 差旅报销集成方案的实现
  6. 我的家庭私有云计划-16
  7. 社会生活中常用的14条著名法则
  8. 行波iq调制器_高速InP基半导体电光调制器行波电极结构研究
  9. 共识机制:区块链技术的根基
  10. 软件开发向大数据开发过渡_如果您是过渡到数据科学的开发人员,那么这里是您的最佳资源...