Jmeter throws “socketexception: connection reset” error during execution

我怕爱的太早我们不能终老 提交于 2021-02-05 11:06:17

问题


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

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

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.

Tried the following fixes from Jmeter side:

  1. Increasing the heap size
  2. Changing the retry count in user.properties file
  3. Changing Boolean=True in hc.parameters file
  4. Used HTTP Request Defaulters to change the implementation to HTTPClient4

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


回答1:


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

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.

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.

More information: Bug 64289



来源:https://stackoverflow.com/questions/63775012/jmeter-throws-socketexception-connection-reset-error-during-execution

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!