hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Moores <a-mmoo...@expedia.com>
Subject Re: Question about application layer timeout vs. socket timeout
Date Fri, 16 Jan 2015 20:49:38 GMT
Following up - maybe what I should do to implement a hard timeout is
execute the request on a separate thread and if this thread is taking
longer than the configured SO timeout I can call the abort() method on the
HttpUriRequest object.
Would that be my best choice?

On 1/16/15, 12:29 PM, "Michael Moores" <a-mmoores@expedia.com> wrote:

>I am seeing a situation where the HTTP transaction looks hung if I
>experience a 
>degraded network.  If the HTTP response data comes back very slowly the
>socket timeout never gets triggered and
>the thread can remain hung up.  I verified this with a quick test,
>controlling the server socket data rate.
>Is there a way in version 4.3.6 to ensure that the connection socket gets
>shutdown if this happens?
>I donĀ¹t see that closeIdleConnections/closeExpiredConnections would help
>when the connection is leased.
>I am using PoolingHttpClientConnectionManager/CloseableHttpClient.
>What I need is an application layer timeout rather than a data link layer

View raw message