0

I m running a load test on the survey page of my application.

For 200 users 1 per second and 1 loop are passing test 180 user and remain 20 user getting below exception.

Kindly help me with the fix.

We use Jmeter version - 3.2 and JDK - 8.2. We already following code in respective file.

httpclient4.retrycount=1,hc.parameters.file=hc.parameters code added in user.properties file and http.connection.stalecheck$Boolean=true in hc.parameters file

java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(Unknown Source)
    at java.net.SocketInputStream.read(Unknown Source)
    at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:158)
    at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:82)
    at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:271)
    at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138)
    at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56)
    at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)
    at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:281)
    at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:257)
    at org.apache.jmeter.protocol.http.sampler.hc.ManagedClientConnectionImpl.receiveResponseHeader(ManagedClientConnectionImpl.java:199)
    at org.apache.jmeter.protocol.http.sampler.MeasuringConnectionManager$MeasuredConnection.receiveResponseHeader(MeasuringConnectionManager.java:212)
    at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
    at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:684)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:486)
    at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:654)
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:413)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1189)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1178)
    at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:491)
    at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:425)
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:254)
    at java.lang.Thread.run(Unknown Source)
4
  • try to increase the ramp up period in Thread group Commented Apr 4, 2018 at 10:49
  • Are you using BigIp or cloudflare or similar service? Commented Apr 4, 2018 at 14:44
  • We use claudflare. Commented Apr 5, 2018 at 6:15
  • It will work after increasing the time but we don't need that. It should be done in second.. Commented Apr 5, 2018 at 6:39

2 Answers 2

0
  1. Change "Implementation" of all your HTTP Request samplers to HttpClient4. The easiest way of doing it is using HTTP Request Defaults configuration element.

  2. Add the following properties in user.properties file which located under /bin folder of your JMeter installation:

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

  3. Add the next line to hc.parameters file (same location, JMeter's /bin folder)

    http.connection.stalecheck$Boolean=true

  4. Restart JMeter.

Your "Connection reset" problem should go away.

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

Comments

0

I asked similar question with no answer yet, but it help to add the line to jmeter.properties:

https.socket.protocols=TLSv1.2 

What fixed my issue was either increasing ramp up period or creating a new DNS which wasn't going through cloudflare services which blocked some of the requests.

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.