Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 882B6101D8 for ; Sat, 31 May 2014 04:40:45 +0000 (UTC) Received: (qmail 43733 invoked by uid 500); 31 May 2014 04:14:05 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 43536 invoked by uid 500); 31 May 2014 04:14:04 -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 43408 invoked by uid 99); 31 May 2014 04:14:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 31 May 2014 04:14:04 +0000 Date: Sat, 31 May 2014 04:14:04 +0000 (UTC) From: "Phil Steitz (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (DBCP-229) Track callers of active connections for debugging MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DBCP-229?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Phil Steitz closed DBCP-229. ---------------------------- > Track callers of active connections for debugging > ------------------------------------------------- > > Key: DBCP-229 > URL: https://issues.apache.org/jira/browse/DBCP-229 > Project: Commons Dbcp > Issue Type: New Feature > Reporter: Armin H=C3=A4berling > Fix For: 2.0 > > > Lately we got the following exception > org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool= exhausted > at > org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource= .java:103) > at > org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.jav= a:540) > The reason for that was that some piece of code opened a connection, but = never closed it. Tracking the active connections (and the callers of the ge= tConnection method) would it make it easier to find such erroneous code. > One possible approach would be to add the connection returned by BasicDat= aSource.getConnection together with the stacktrace in a Map holding all act= ive connections. And removing the connection from the map during PoolableDa= taSource.close(). -- This message was sent by Atlassian JIRA (v6.2#6252)