You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Nicholas Rahn <ni...@mnc.ch> on 2004/05/27 15:19:48 UTC

ConnectionTimeoutException thrown without waiting.

Hello,

We are using HttpClient 2.0 within a local network to send XML files
between 2 servers.  We send 4 XML documents in 4 separate requests, one
after the other.  The problem we are seeing is that the 3rd request does
not get sent due to a ConnectionTimeoutException.  We have set the
connection timeout to 5000 milliseconds, but in the logs we see that the
exception is thrown 2 milliseconds later.  After the 3rd request fails,
the 4th request works fine.

With each request we send the connection:close header so a new
connection should be opend every time.  One strange thing we see is that
after the 2nd request it takes about 20 seconds for HttpMethodBase to
acknowledge that the connection should be closed.  With the other
requests, this is almost instantanious.

I am not convinced this is an HttpClient problem as i am unable to
replicate the problem in my test environment (of course it only happens
in the production environment :-).  Maybe someone has some insight into
what's happening.

Here are our details:
HttpClient2-20040526
j2sdk1.4.2

I've included the wire and debug logs (with the XML documents removed). 
The INFO lines are from our application to give more detail on what the
exception was.

Thanks for your help,
Nick