On Thu, 2008-09-18 at 14:56 -0700, Tatu Saloranta wrote: > I have tried to figure out exact relationship between settings that limit > per-connection manager number of connections: maximum connections to > open/retain per-host, and max connections overall. > I read documentation on web site, apologies if I missed an obvious answer. >
Hi Tatu I am sorry it took me so long to get back to you. > Specifically, I am trying to figure out whether there is any difference > between using persistent connections and not. Right now I assume there is no > difference -- persistent connections are just held onto in hopes they may be > reused, but either way, these are hard limits for all connections (per-host > and total). > This limitation no longer applies to HttpClient 4.0, where only persistent connections are kept in the pool. Closed connections are discarded upon release. > But what I really would be able to figure out is this: is there a way to > limit number of persistent (keep-alive) connections to lower value than > hard-limit on number of connections that can be opened? > Basically so that limit to check against when opening a connection would be > higher (say, 10), but limit to check when deciding whether client will keep > the connection would be lower (say, 2). This would allow for temporary > opening of higher number of concurrent connections during load spikes, > without leaving higher number of open connections. > I do not see a problem with that, but you would have to subclass ConnPoolByRoute and override #freeEntry method > I guess alternative way would be to just use aggressive values for closing > free open connections. > I personally think this is a better solution. Just evict idle connections more aggressively. That is it. Hope this helps Cheers Oleg > I appreciate any suggestions, > > -+ Tatu +- > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
