Configuring response timeout in Apache JMeter

Dominik Antal picture Dominik Antal · Aug 8, 2014 · Viewed 42.3k times · Source

I am trying to check if a particular HTTP request's response time is over 30 seconds, and if it is, then mark it as failed and stop the thread. Because now sometimes I can even see response times close to 80seconds, an no browser is waiting that long for a reply.

I found the following three ways to set a timeout value in JMeter, however this confuses me, because there is multiple options and I don't know which one to use, or if there is any difference at all between them.

So here are the options I found that are related to response timeout:

  1. Setting Response timeout value in the sampler enter image description here
  2. Add a Duration assertion

enter image description here
3. Setting timeout in jmeter.properties configuration file. Options I found here:

  1. os_sampler.poll_for_timeout=x
  2. http.socket.timeout=x
  3. httpclient.timeout=x

So, the problem is that I don't know where to set the response timeout from the listed options. Is there any difference at all between these options? So what I would like to see as a result: If a particular HTTP request takes more than 30 seconds to reply, stop waiting for a response and mark it as a failed request.

Answer

Devrim picture Devrim · Nov 10, 2015

Socket/Connect and Read/Response timeouts can be set from Http Request Defaults section at jmeter GUI. See sample:

Connect timeout: 3 seconds
Response timeout: 20 seconds.

enter image description here