hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18596] - MultiThreadedHttpConnectionManager never reclaims unused connectons
Date Wed, 02 Apr 2003 04:47:23 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=18596>.
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=18596

MultiThreadedHttpConnectionManager never reclaims unused connectons





------- Additional Comments From becke@u.washington.edu  2003-04-02 04:47 -------
Attached is another take on adding support for a maximum number of connections
to the MultiThreadedHttpConnectionManager.  This code is based upon the patch
submitted by Carl Dunham.  Here are some key points:

- the connection timeout is no longer implemented using a separate thread. 
instead, threads use Object.wait() and keep track of the amount of wait time.
- unused connections are reclaimed in a LRU-like manner
- an attempt is made to give connections to threads that can reuse them
directly.  for example, if two threads are waiting for a connection, the
connection will be given first to the thread using the same host as the connection.
- all connection access is still locked by a single monitor.  I had hoped to
make things a little more modular but after quite a bit of experimenting I
discovered this was much harder that I had anticipated.

To anyone who is interested in this functionality, please take a good look at
this patch.  I suspect there are a few things that I am missing.  Any real-world
testing would be great.

Thanks,

Mike

Mime
View raw message