hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <http-as...@dubioso.net>
Subject Re: Problem with HttpConnectionManagerParams.setSoTimeout not timing out
Date Wed, 03 Jan 2007 12:48:30 GMT
Hi Karl,

> I have decided to do is build my own version of 3.0.1 with added logging
> and diagnosis. (Isn't open source great!)

(Yes it is :-)

> Specifically, I have added a log message in HttpMethodBase.execute to
> log conn.getSocket().getSoTimeout() immediately before writeRequest and 
> readResponse, and also in HttpMethodDirector.executeWithRetry when the
> connection is opened. I also created a little thread class that will
> dump all socket parameters when a certain file exists, so that when my
> process blocks I can see the timeout that is in effect.

The timeout of the socket is updated by several methods based on the
timeout in the connection parameters. You should at least log the
timeout of the connection parameters in addition to the one reported
by the socket itself.

Also have a look at HttpMethodDirector.applyConnectionParams(...):
http://svn.apache.org/repos/asf/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodDirector.java
There you see that a timeout parameter set for the method, the defaults
of which are those of the HostConfiguration, of which the defaults are
those of the HttpMethodDirector, which should be those of the client...
will have precedence over a timeout in the connection manager parameters.

good luck,
  Roland


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