On Fri, 2015-01-16 at 20:49 +0000, Michael Moores wrote: > 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? > >
Yes, it is. The feature you want is called 'request deadline'. For details see: https://issues.apache.org/jira/browse/HTTPCLIENT-1074 Oleg > > On 1/16/15, 12:29 PM, "Michael Moores" <[email protected]> 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 > >timeout. > > > >Thanks, > >Michael > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
