hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vasantha Tammana \(vtammana\)" <vtamm...@cisco.com>
Subject RE: Setting Httpclient Timeout
Date Tue, 15 Aug 2006 22:18:26 GMT
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?

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?

- 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.

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

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



> 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

View raw message