1

What is the default connect and response timeout for HTTP request in Jmeter?

I didn't change any settings in jmeter.properties file.

enter image description here

# set the socket timeout (or use the parameter http.socket.timeout)
# for AJP Sampler implementation.
# Value is in milliseconds
#httpclient.timeout=0
# 0 == no timeout

# Idle connection timeout (Milliseconds) to apply if the server does not send
# Keep-Alive headers (default 0)
# Set this > 0 to compensate for servers that don't send a Keep-Alive header
# If <= 0, idle timeout will only apply if the server sends a Keep-Alive header
#httpclient4.idletimeout=0

# Polling to see if process has finished its work, used when a timeout is configured on sampler
#os_sampler.poll_for_timeout=100
CaldeiraG
  • 2,623
  • 8
  • 21
  • 34
Dariusz
  • 11

1 Answers1

1

Looking into JMeter 5.1 source code:

public int getConnectTimeout() {
    return getPropertyAsInt(CONNECT_TIMEOUT, 0);
}

public void setResponseTimeout(String value) {
    setProperty(RESPONSE_TIMEOUT, value, "");
}

public int getResponseTimeout() {
    return getPropertyAsInt(RESPONSE_TIMEOUT, 0);
}

The default value is 0 which means "no timeout" therefore JMeter will wait for connection/response forever. So to be on the safe side I would recommend defining reasonable timeouts using HTTP Request Defaults

Dmitri T
  • 596