You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2002/10/28 07:08:02 UTC
DO NOT REPLY [Bug 14005] New: -
HttpMultiClient reuses
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>