You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Hien Luu <hl...@yahoo.com> on 2010/04/23 20:27:05 UTC
MultiThreadedHttpConnectionManager Not Closing Idle HttpConnection
Hi,
We are using HTTPClient-3.1 and I was wondering if someone can confirm this.
Let's say MultiThreadedHttpConnectionManager is configured as follow:
http.connection-manager.max-per-host: 10
http.connection-manager.max-total: 50
and then I call HttpClient.executeMethod() twice. So now there are two connections in the free connection list.
And for the next 2 hours, there are no call to HttpClient.executeMethod(). So basically those two
connections are idle for that 2 hours duration. Does MultiThreadedHttpConnectionManager try to free or close those
2 idle connections?
I was looking at the HTTPClient-3.1 source code and ran a simple test, it seems like MultiThreadedHttpConnectionManager
doesn't do anything with those 2 connections.
Basically the HttpConnection pool size goes up and does not go down. It would be great to get a confirmation if what I am seeing
is correct.
I see there is IdleConnectionTimeoutThread.java class, but I don't see where it is used except in TestIdleConnectionTimeout test case.
Thanks,
Hien