JMeter:java.net.SocketException:连接重置 [英] JMeter: java.net.SocketException: Connection reset

查看:5705
本文介绍了JMeter:java.net.SocketException:连接重置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一旦执行登录脚本的用户很少,我看不到连接重置问题,但是当运行100个用户时,将出现" java.net.SocketException:连接重置".抛出第一个链接.

Once a Login script is executed with few user, I don't see connection reset problem, whereas, when the same is run 100 users, "java.net.SocketException: Connection reset" starts throwing for very first link.

我不明白的是,如果存在连接问题,那么对于单个或几个用户,它甚至应该显示相同的错误.

What I don't understand is if there is connection problem, then it should even show the same error for single or few users as well.

推荐答案

连接中可能描述了这种情况从JMeter 2.10? Wiki页面开始重置.

It might be the case described in Connection Reset since JMeter 2.10 ? wiki page.

如果您完全确定服务器没有过载,并且配置为可以接受100多个连接(默认值适用于开发,不适合生产,则需要对其进行调整),您可以尝试按以下方法解决该问题:

If you are absolutely sure that your server is not overloaded and is configured to accept 100+ connections (defaults are good for development, not for production, they need to be tweaked) you can try work it around as follows:

  1. user.properties 文件中,添加以下两行:

  1. In user.properties file add the next 2 lines:

httpclient4.retrycount=1
hc.parameters.file=hc.parameters

  • hc.parameters 文件中添加以下行:

  • In hc.parameters file add the following line:

    http.connection.stalecheck$Boolean=true
    

    这两个文件都位于JMeter的 bin 文件夹中.

    Both files live in JMeter's bin folder.

    以上说明适用于HttpClient4实现,请确保使用它,为所有HTTP Request采样器设置HttpClient4实现的最快,最简单的方法是使用

    Above instructions are applicable for HttpClient4 implementation, make sure you use it, the fastest and the easiest way to set HttpClient4 implementation for all the HTTP Request samplers is using HTTP Request Defaults

    这篇关于JMeter:java.net.SocketException:连接重置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    相关文章
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆