commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe Mouawad (JIRA)" <j...@apache.org>
Subject [jira] Created: (DBCP-294) Memory leak in XA Implementation
Date Fri, 12 Jun 2009 13:48:07 GMT
Memory leak in XA Implementation
--------------------------------

                 Key: DBCP-294
                 URL: https://issues.apache.org/jira/browse/DBCP-294
             Project: Commons Dbcp
          Issue Type: Bug
    Affects Versions: 1.3, 1.4, 2.0
         Environment: JDK5, Oracle 10G
            Reporter: Philippe Mouawad
            Priority: Critical


Hello,
We are been using Ofbiz with DBCP based implementation.
Ofbiz uses a Head revision of DBCP (package org.apache.commons.dbcp.managed is the same as
current TRUNK) and geronimo-transaction-1.0.

We are having recurrent OutOfMemory which occur on a 2 days basis.
I analyzed the Heap Dump and I think have found the source of the problem:
The Heap Dump shows a Retained Heap of 400Mo by org.apache.commons.dbcp.managed.TransactionRegistry#xaResources
field.

After analyzing more deeply, the leak seems to come from what is stored in xaResources through
xaResources.put(connection, xaResource);

Values inside weak Hash map  will never be removed since XAResource holds a STRONG reference
on key (connection) through:
org.apache.commons.dbcp.managed.LocalXAConnectionFactory$LocalXAResource through:
public LocalXAResource(Connection localTransaction) {
            this.connection = localTransaction;
        }




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message