On Wed, 2011-07-13 at 12:55 -0400, Jon Moore wrote: > Hi folks, > > As a result of looking into the adaptive connection pools, I noticed > that the ConnPoolByRoute uses a queue to manage its open, reusable > connections, meaning the connections get used in a FIFO (round-robin) > fashion. One downside of this is that if the client currently has more > connections open than it really needs to keep up, it won't ever close > them. > > For example, suppose during a burst of activity, the client ends up > with 3 open connections, but then settles down to a steady-state of > executing 2 requests per second, where each request takes 1 second on > average. In theory, the client could be getting away with just using > two connections here, but because the 3 existing connections are used > in a round-robin fashion, none of them are ever reclaimed and closed > by the "close idle connections" mechanism. > > I think if the ConnPoolByRoute simply used a stack (LIFO) instead of a > queue that any excess capacity in terms of open connections would > eventually get reclaimed. I'm going to prototype this quickly, but > wanted to see if anyone else had any feedback. > > Jon >
This does sounds like a bug which we should fix for the next release. Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
