1

I am doing load tests on a web app over HTTPS and experiencing these errors when I ramp-up over 60 simultaneous threads:

java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(Unknown Source)
    at java.net.SocketInputStream.read(Unknown Source)
    at sun.security.ssl.InputRecord.readFully(Unknown Source)
    at sun.security.ssl.InputRecord.read(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:404)
    at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:364)
    at org.apache.jmeter.protocol.http.sampler.hc.LazyLayeredConnectionSocketFactory.connectSocket(LazyLayeredConnectionSocketFactory.java:92)
    at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl$JMeterDefaultHttpClientConnectionOperator.connect(HTTPHC4Impl.java:336)
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:374)
    at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:843)
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:574)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:67)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.followRedirects(HTTPSamplerBase.java:1578)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.resultProcessing(HTTPSamplerBase.java:1672)
    at org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl.resultProcessing(HTTPAbstractImpl.java:556)
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:660)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:67)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1231)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1220)
    at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:622)
    at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:546)
    at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:486)
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253)
    at java.lang.Thread.run(Unknown Source)

I am using Jmeter 5.1.1 and I set httpclient.reset_state_on_thread_group_iteration=false. Are these errors representative of a situation that could occur in real world? If so, what's the key to solve them? If not, how can I fix my Jmeter?

Edit:

I have tried to access the application while running 200 simultaneous threads and got ERR_CONNECTION_RESET in Chrome on the same machine. On another machine, different network, I can access the website during the load tests. So the bottleneck is on my own testing machine

1

2 Answers 2

1

While you are getting this error, try to access application manually. If application is not accessible, then there are some performance issues with application. However, if you can access application easily, then there are some issues with the way you are executing load test.

One reason might be the low bandwidth of the machine on which Jmeter scripts are executing. e.g If you are on 2Mbps line, then all the Jmeter users are sharing that bandwidth only which is definitely low (for every user =2Mbps/60).

Sign up to request clarification or add additional context in comments.

5 Comments

Thanks for helping, your post should be a comment, though. I have tried to access the application while running 200 simultaneous threads and got ERR_CONNECTION_RESET in Chrome on the same machine. On another machine, different network, I can access the website during the load tests. So the issue is on my own testing machine
Yes. So problem with your testing machine. Since, I am a new user and don't know much rules here, will take care of it in future.
No problem, just that comments are for investigating further (like you did) while answers are supposed to be definitive solutions
I am glad that I was able to help you. If you think my answer has provided you the appropriate solution, you can mark it as an answer. :)
Unfortunately it's not a solution, it helped highlight that my testing machine (or Jmeter config) is in cause, but my problem is still there!
0

The problem was not related to the back-end but to the corporate proxy (squid) because I was launching the tests from inside my company's network, and the target was on the internet. I've switched to virtual machines on a public cloud for JMeter and it solved the problem.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.