Mantis - Resin
Viewing Issue Advanced Details
5647 crash sometimes 02-03-14 07:15 05-05-14 10:26
closed 4.0.37  
none 4.0.40  
0005647: ConnectionPool can cause memory leaks
com.caucho.env.dbpool.ConnectionPool + suspended transactions can cause classloader leaks and eventually OutOfMemoryError: PermGen space.
Reference chain is as follows: Thread -> ThreadLocalMap -[Entry for key com.caucho.transaction.TransactionManagerImpl._threadTransaction]-> TransactionImpl -> UserTransactionSuspendState -> ManagedPoolItem -> ConnectionPool -> ClassLoader

Suggested ways to fix this is to set _suspendState to null in TransactionImpl.resume()
Alternative solutions would include unset ConnectionPool._classLoader on all pools of an application when undeploying and calling remove on TransactionManagerImpl._threadTransaction before returning Thread to thread pool (will only cover pooled threads).

There are no notes attached to this issue.