commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 14005] New: - HttpMultiClient reuses
Date Mon, 28 Oct 2002 06:08:02 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14005>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14005

HttpMultiClient reuses 

           Summary: HttpMultiClient reuses
           Product: Commons
           Version: Nightly Builds
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: HttpClient
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: adrian@ephox.com


If a socket times out while sitting in the connection pool, 
HttpConnectionManager still attempts to reuse it resulting in an IOException 
being thrown when writing to the socket.  I believe this is a problem with both 
server side and client side timeouts (ie: we try to reuse a connection that we 
timed out) though am not certain of that.  At the very least server side 
timeouts cause the issue.

As yet I can't see how to fix this.  With the current code there doesn't even 
appear to be a suitable workaround because when the exception is thrown, the 
connection is added back into the pool to be reused (even though it is closed) 
which causes the next attempt to fail as well.

I can't see any reliable way to tell whether or not a connection is open, so 
would suggest the following as a fix:

1. In HttpMultiClient.executeMethod, close the connection if an exception is 
thrown (optionally, only if an IOException is thrown instead of an 
HttpException, but generally exceptions tend to leave things in an unknown 
state).

2. (optional) Add a retry loop to executeMethod to retry if an exception occurs 
(possibly only if an IOException is thrown, depending on exactly when a 
HttpException is thrown).

I'll attach a patch which does both of this to help clarify.

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message