Connection Reset since JMeter 2.10 ?

If you upgraded recently to JMeter 2.10 or 2.11, you may have noticed increased errors of this type:

  • Socket closed
  • Non HTTP response code: org.apache.http.NoHttpResponseException (the target server failed to respond)


The increase of this type of errors can be explained by two settings changes:

  • retry of failing request (idempotent ones only) has been disabled in JMeter 2.10
  • stale check in HTTP Client 3 and 4 implementations has been disabled in JMeter 2.11

Why these changes?

Previous retry default settings led to increased number of Requests in certain type of failures.

Previous stale check was a bit expensive, as it applied to every sample. That is why the default was changed to disable it.

Retry or stale check can hide issues on Server configuration:

  • Server failing to send the (optional) Keep-Alive header
  • Overwhelmed server refusing connection, retrying would increase load

Changing configuration:

If you think this server behavior is OK, then configuration can be changed in two places:

Enabling retry

For HttpClient 4, in set :

  • httpclient4.retrycount=1

This will make JMeter retry once. For HttpClient 3, in set:

  • httpclient3.retrycount=1

This will make JMeter retry once.

Enabling stale check

For HC4 Implementation:


  • hc.parameters.file=hc.parameters

In hc.parameters set:

  • http.connection.stalecheck$Boolean=true

For HC3 Implementation:


  • httpclient.parameters.file=httpclient.parameters

In httpclient.parameters set:

  • http.connection.stalecheck$Boolean=true

New setting in JMeter 2.12

Upcoming version of JMeter adds a setting to add an idle connection timeout if the server does not send Keep-Alive headers.

This value is in milliseconds:

  • httpclient4.idletimeout=<time in ms>

Interesting links:

Scope of document

This article is about the increase of Socket closed error.

You may have this kind of issues even with retry and stale check enabled, in this case check server configuration and load.


Philippe M.

  • No labels