On Wed, 2013-09-25 at 10:11 +0200, Sebastiano Vigna wrote:
> On 25 Sep 2013, at 9:55 AM, Oleg Kalnichevski <[email protected]> wrote:
> 
> > Socket timeout is your best friend.
> 
> 
> Sorry, I thought that was obvious. This is our default request config:
> 
>               defaultRequestConfig = RequestConfig.custom()
>                               .setSocketTimeout( rc.socketTimeout )
>                               .setConnectTimeout( rc.connectionTimeout )
>                               .setConnectionRequestTimeout( 
> rc.connectionTimeout )
>                               .setRedirectsEnabled( false )
>                               .build();
> 
> Both rc.socketTimeout and rc.connectionTimout values are equal to 60000.
> 
> We perform our request with
>                               httpGet.setConfig( defaultRequestConfig );
>                               httpClient.execute( httpHost, httpGet, new 
> ResponseHandler<Void>() {
>                                       ...
>                               }
> 
> Is there any other socket timeout we should be aware of?
> 

There are probably two most possibilities here: (1) there is a bug in
HttpClient and the socket value does not correctly apply (I have tested
such scenario on a number of occasions, so I do not find it likely), (2)
the target servers keep on sending data either infinitely or at a very
slow rate (in both cases the connection never reaches the level of
inactivity for socket timeout to fire).

Oleg

PS: please always respond to the list.

> Ciao,
> 
>                                       seba
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to