帅帅男孩 发表于 2018-10-16 09:42:04

loadrunner中关于Failed to connect to server错误

    Action.c(4): Error -27796: Failed to connect to server "stadig.ifeng.com:80": 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-----关闭连接

页: [1]
查看完整版本: loadrunner中关于Failed to connect to server错误