From: Radics P. <mi...@lb...> - 2005-01-11 11:58:12
|
Hello, We've run into a small problem with proxool-0.8.3 regarding connectionCount. In some cases it's possible that a connection gets removed twice, resulting in connectionCount in Prototyper decrease twice, thus going below zero. This in turn causes Prototyper to build more connections than it really needs, resulting in more "Available" connections than the specified maximum-connection-count. We run into this when an Active transaction was running for too long, and HouseKeeper killed it at: HouseKeeper.sweep() line: 139 then later on when we closed the connection in a finally{} block, it closed it again: ProxyConnection(AbstractProxyConnection).reallyClose() line: 175 ConnectionPool.removeProxyConnection(ProxyConnectionIF, String, boolean, boolean) line: 414 ProxyConnection(AbstractProxyConnection).close() line: 226 ProxyConnection.invoke(Object, Method, Object[]) line: 55 Proxy$ProxyImpl$$EnhancerByCGLIB$$5d6d109f.close() line: not available ProxoolConnectionProvider.closeConnection(Connection) line: 73 BatchingBatcher(BatcherImpl).closeConnection(Connection) line: 305 SessionImpl.disconnect() line: 3352 SessionImpl.close() line: 576 I've attached a patch with a quick-and-dirty fix for this problem. It Works For Us (Tm), so use at your own peril :) Please drop me a note if a better solution is avaliable. (There is another connectionCount in ConnectionPool that only gets decreased, and never increased, but that doesn't cause that big of a problem, I think. Anyway, that patch attempts to fix that, too) cheers, mitch -- // Radics Peter <mi...@lb...> (http://lbcons.net) // // "If human beings don't keep exercising their lips, // their brains start working." -- Ford Prefect |