Jmeter抛出"socketexception:connection reset"(套接字异常:连接重置)执行期间发生错误 [英] Jmeter throws "socketexception: connection reset" error during execution

查看:788
本文介绍了Jmeter抛出"socketexception:connection reset"(套接字异常:连接重置)执行期间发生错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们要实现的目标是500个并发用户. 我们尝试了对3台计算机上的100位用户进行测试.而且运行良好,没有任何错误. 当我尝试使用相同数量的计算机为150个或更多用户运行测试时,我开始获得以下响应代码

The target for us to achieve is 500 concurrent users. We have tried running a test for 100 users over 3 machines. And it ran fine without any errors. When i tried running the test for 150 or More users with same number of machines, i started getting the following response code

响应代码:非Http响应代码:java.net.socketException 响应消息:连接重置

Response code:Non Http Response code:java.net.socketException Response message:Connection Reset

我还尝试将计算机数量增加到8台.仍然没有帮助.对于某些请求,响应时间也非常长(156秒).

I have also tried increasing the number of machines to 8 machines. Still it is of no help. Response time is also very high (156 seconds) for some of the requests.

当我们检查服务器日志以找出可能导致此问题的原因时,在执行期间未发现错误日志.

When we checked the server logs to find out what could be causing this issue, No error logs were found there during the time of the execution.

我很难找出可能是什么问题.服务器端正在排除是否可能出现问题.

I'm having a hard time finding out what could be the issue. The server side is ruling out if there could be an issue from their end.

从Jmeter端尝试了以下修复程序:

Tried the following fixes from Jmeter side:

  1. 增加堆大小
  2. 更改user.properties文件中的重试计数
  3. 在hc.parameters文件中更改Boolean = True
  4. 使用HTTP请求默认值将实现更改为HTTPClient4

CPU配置: 英特尔(R)至强(R)CPU E5-2690 v3 @ 2.60 GHz(2个处理器) 5 GB内存 64位操作系统

CPU Config: Intel (R) Xeon(R) CPU E5-2690 v3 @ 2.60 GHz (2 Processors) 5 GB Ram 64-bit Operating System

推荐答案

Connection Reset错误表示尝试写入已关闭的套接字失败,在TCP协议级别,这意味着接收到

The Connection Reset error means failed attempt to write to the socket which has been closed already, on TCP protocol level it means receiving a TCP RST

可能是JMeter过早关闭连接的情况,因为JMeter 5.0将httpclient4.time_to_live属性设置为2000,并且您看到的响应时间是>. 2秒(您确实会这样做),JMeter很可能在获得完整响应之前就关闭了连接.

It might be the case JMeter is closing the connection prematurely as JMeter 5.0 had httpclient4.time_to_live property set to 2000 and if you're seeing response times > 2 seconds (and you do) most probably JMeter is closing the connection before getting the full response.

您可以尝试将此设置增加到60000,以匹配现代浏览器的默认设置,或者甚至更多以匹配您的应用程序响应时间(如果您认为3分钟是可以接受的),或者考虑升级到

You can try increasing this setting to 60000 matches modern browsers default settings or even more to match your application response time (if you think 3 minutes is acceptable) or consider upgrading to JMeter 5.3 which has better default value.

更多信息:错误64289

这篇关于Jmeter抛出"socketexception:connection reset"(套接字异常:连接重置)执行期间发生错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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