hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Client stuck
Date Wed, 25 Sep 2013 10:21:17 GMT
On Wed, 2013-09-25 at 10:11 +0200, Sebastiano Vigna wrote:
> On 25 Sep 2013, at 9:55 AM, Oleg Kalnichevski <olegk@apache.org> 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: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message