loadrunner 常见 error

来源:互联网 发布:完美主义 知乎 编辑:程序博客网 时间:2024/06/02 09:44

Action.c(4): Error -27796: Failed to connect to server "stadig.ifeng.com:80": [10048] Address already in use

Try changing the registry value 

HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/tcpip/Parameters/TcpTimedWaitDelay to 30

and HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/tcpip/Parameters/MaxUserPort to 65534

and rebooting the machine

See the readme.doc file for more information

压测目标是一个简单的js,服务器处理很快。LR压力测试遇到如上错误,跟据提示在注册表中已将TcpTimedWaitDelay  改为 1;MaxUserPort 改为 65534;并且重启电脑。运行后仍出现上面的错误。后来在 run-time setting/browser emulation中

将simulate a new user on each iteration  选项去掉(默认是选中的)。重新运行一切正常,没有错误出现。

 

猜测原因,客户端性能比较好,发出压力太快,所以把tcp/ip的连接或端口占满。在网上查了一下,xp好像默认开启15个tcp/ip

去掉这个选项的意思是,始终使用一个tcp/ip链接,不断开,也就是开发人员所说的长链接或持久连接。    
短连接:建立连接-----发送和接收报文1-------关闭连接

长连接:建立连接-----发送和接收报文1.。。。2.。。。3-----关闭连接