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: Setting Httpclient Timeout
Date Tue, 15 Aug 2006 22:32:49 GMT
On Tue, 2006-08-15 at 15:18 -0700, Vasantha Tammana (vtammana) wrote:
> Thanks Oleg for your response. I will change my connection timeout to
> socket timeout.
> Can you please tell me the difference between these two timeouts?
> 

See
http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/params/HttpConnectionParams.html#CONNECTION_TIMEOUT
http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/params/HttpConnectionParams.html#SO_TIMEOUT

> Coming to the precedence, if I don't set socket timeout on method (i.e
> leave the defaults), but let's say I set it host level, will that make
> sure it timesout?

It should. For details see
http://jakarta.apache.org/commons/httpclient/preference-api.html

Oleg

> 
> Thanks,
> - vasantha
> 
> -----Original Message-----
> From: Oleg Kalnichevski [mailto:olegk@apache.org] 
> Sent: Tuesday, August 15, 2006 3:10 PM
> To: HttpClient User Discussion
> Cc: Vasantha Tammana (vtammana)
> Subject: Re: Setting Httpclient Timeout
> 
> On Tue, 2006-08-15 at 14:56 -0700, Vasantha Tammana (vtammana) wrote:
> > Hi,
> >  
> > I have connection timeout set on HttpConnectionManager
> > (MultiThreadedHttpConnectionManager.getParams().setConnectionTImeout(x
> > )) . It seems to be not taking effect i.e it does not timeout at the 
> > end of timeout time when there is no response.
> >  
> Vasantha,
> 
> I suspect you are confusing the socket timeout with the connect timeout.
> Make sure that you set the socket timeout either at the connection
> manager level, or at the host level, or at the method level
> 
> > I remember reading some mailing archives on HttpClient that the 
> > timeout on HostConfiguration takes precedence than the
> ConnentionManager etc.
> > Can somebody clarify the precedence on params settings with 
> > HostConfigurations, ConnectionManager, HttpClient and finally
> GetMethod?
> >  
> 
> The _socket_ timeout value, if set, takes precedence in the following
> order: method, host, connection manager, agent
> 
> > It is really confusing, because you can set the connection timeout in 
> > params at each layer.
> 
> This is not quite the case. The _connect_ timeout can be set either at
> the connection manager level or at the agent level
> 
> Hope this helps
> 
> Oleg
> 
> > 
> 
> >  
> > Any help is really appreciated.
> >  
> > 
> > Thanks,
> > - Vsantha
> >  
> > 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message