Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 645 invoked from network); 12 Jun 2009 14:04:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Jun 2009 14:04:26 -0000 Received: (qmail 12813 invoked by uid 500); 12 Jun 2009 14:04:36 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 12719 invoked by uid 500); 12 Jun 2009 14:04:36 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 12709 invoked by uid 99); 12 Jun 2009 14:04:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jun 2009 14:04:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jun 2009 14:04:27 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 627B2234C004 for ; Fri, 12 Jun 2009 07:04:07 -0700 (PDT) Message-ID: <1229256312.1244815447388.JavaMail.jira@brutus> Date: Fri, 12 Jun 2009 07:04:07 -0700 (PDT) From: "Philippe Mouawad (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (DBCP-294) Memory leak in XA Implementation In-Reply-To: <789585612.1244814487738.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DBCP-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Philippe Mouawad updated DBCP-294: ---------------------------------- Description: 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; } www.ubik-ingenierie.com was: 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; } > 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; > } > www.ubik-ingenierie.com -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.