Madhuri Jain
Madhuri Jain

Reputation: 97

JMeter httpclient.timeout property not working

In continuation to working on this issue - JMeter test not stopping after duration ends in distribution mode

Using JMeter version - 5.4

I got a thread dump and figured out few threads are getting stuck on HTTP Requests.

The resolution figured out is to set timeouts for the HTTP Requests as mentioned here - Configuring response timeout in Apache JMeter

But I'm not the author of the test plan. Hence, the only way I could use is to set JMeter properties. I've set the following in jmeter.properties (values are for local testing):

httpclient.timeout=100
hc.parameters.file=hc.parameters
os_sampler.poll_for_timeout=100

and in hc.parameters

http.socket.timeout$Integer=100

But unfortunately none of these are working.

The only timeouts working are the ones when I set them in Advanced Tab of HTTP Sampler of the test plan.

Do we have any platform recommendation to control this behavior (like some other setting or property etc.)? Or am I missing anything in the above mentioned properties?

Also, I do sometimes get this exception in response, but I highly doubt if this is related?

Non HTTP response code: java.net.BindException
Non HTTP response message: Address already in use: connect

Upvotes: 0

Views: 552

Answers (1)

Dmitri T
Dmitri T

Reputation: 168072

Your steps are correct so it looks like a bug in JMeter, presumably a side-effect of this commit so you have 2 options:

  1. Downgrade to JMeter 5.0 where this functionality is still working
  2. Raise an issue in JMeter Bugzilla but you will need to wait until someone fixes it and then either for a nightly build or a new release containing this fix
  3. Fix it yourself and contribute the fix to the upstream

Upvotes: 1

Related Questions