I can't find any documentation on the default httpParams for httpclient 4.1 ?
What's the default socket timeout when I do a GET ?
The default timeout is infinite. By default RestTemplate uses SimpleClientHttpRequestFactory and that in turn uses HttpURLConnection.
timeout) – the time waiting for data – after establishing the connection; maximum time of inactivity between two data packets. the Connection Manager Timeout (http. connection-manager. timeout) – the time to wait for a connection from the connection manager/pool.
The Request Timeout property specifies the number of seconds the server waits between accepting a connection to a client and receiving information from it. The default setting is 30 seconds.
The HTTP read timeout determines how long the IBM® IoT MessageSight Web UI waits before it times out when it is waiting for an HTTP read request to complete. By default, this value is set to 20 seconds. If you have a slow connection, it is possible that your HTTP read request cannot complete within 20 seconds.
According to the documentation, the http.socket.timeout
parameter controls the SO_TIMEOUT value, and:
If this parameter is not set, read operations will not time out (infinite timeout).
The accepted answer is not applicable for newer versions of HttpClient. Versions 4.3.X and above use the system default which is usually 60 secs.
Taken from HttpClient javadoc.
public int getSocketTimeout() Defines the socket timeout (SO_TIMEOUT) in milliseconds, which is the timeout for waiting for data or, put differently, a maximum period inactivity between two consecutive data packets). A timeout value of zero is interpreted as an infinite timeout. A negative value is interpreted as undefined (system default). Default: -1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With