Configuring response timeout in Apache JMeter

For your need, an assertion is not the right solution as it will only mark the request as failed but it will wait.

The right option is a response timeout.

Regarding the 3rd point

  1. os_sampler.poll_for_timeout=x => not for http, see:

    • https://github.com/apache/jmeter/blob/master/bin/jmeter.properties
  2. http.socket.timeout=x => applies to all requests using HttpClient4 or 3, see:

    • https://github.com/apache/jmeter/blob/master/bin/hc.parameters
  3. httpclient.timeout=x => Same, see:

    • https://github.com/apache/jmeter/blob/master/bin/jmeter.properties

I think the best option is to use 1. , if you want those values to apply to all requests, just use Http Request Defaults element:

  • https://jmeter.apache.org/usermanual/component_reference.html#HTTP_Request_Defaults

HTTP Request Defaults

If you're looking to learn jmeter correctly, this book will help you.


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