0
votes

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)
2
try to increase the ramp up period in Thread group - user7294900
Are you using BigIp or cloudflare or similar service? - user7294900
We use claudflare. - Heli Shah
It will work after increasing the time but we don't need that. It should be done in second.. - Heli Shah

2 Answers

0
votes
  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.

0
votes

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.