I try to find out the timeout of the Apache HttpClient. The doc file* says that the default timeout for http connections is the "system default" timeout. But what is the "system default"? And how can I find out what the value for the "system default" timeout is set to?
*"A timeout value of zero is interpreted as an infinite timeout. A negative value is interpreted as undefined (system default).
Default: -1"(https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/client/config/RequestConfig.html#getConnectTimeout())
The default value is 60 seconds. [server] intra-connection-timeout = 60. If the value of this stanza entry is set to 0 (or not set), connection timeouts between data fragments are governed instead by the client-connect-timeout stanza entry. The exception to this rule occurs for responses returned over HTTP (TCP).
The default timeout is infinite. By default RestTemplate uses SimpleClientHttpRequestFactory and that in turn uses HttpURLConnection.
There are two timeout settings: Max Wait Time: Amount of time the caller (the code requesting a connection) will wait before getting a connection timeout. The default is 60 seconds.
Client timeouts, also called idle timeouts, occur when a client is disconnected from a Relay server after being inactive for longer than the 10 second TTL value. A TTL value, or time to live value, is a mechanism that limits the lifetime of idle connections to a Relay server.
System default in this particular situation means whatever socket timeout value set by the Java runtime. If the socket timeout configuration parameter is undefined, HttpClient makes no attempts to control the SO_TIMEOUT setting on connection sockets.
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