Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 58892 invoked from network); 19 Oct 2007 13:51:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Oct 2007 13:51:41 -0000 Received: (qmail 30851 invoked by uid 500); 19 Oct 2007 13:51:28 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 30802 invoked by uid 500); 19 Oct 2007 13:51:28 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 30788 invoked by uid 99); 19 Oct 2007 13:51:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Oct 2007 06:51:28 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [72.22.94.67] (HELO virtual.halosg.com) (72.22.94.67) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Oct 2007 13:51:31 +0000 Received: (qmail 3429 invoked from network); 19 Oct 2007 08:47:55 -0500 Received: from 72-19-171-38.static.mesanetworks.net (HELO ?192.168.3.103?) (72.19.171.38) by halosg.com with SMTP; 19 Oct 2007 08:47:55 -0500 Message-ID: <4718B650.7010007@hanik.com> Date: Fri, 19 Oct 2007 07:51:12 -0600 From: Filip Hanik - Dev Lists User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Jakarta Commons Users List Subject: Re: DBCP - Where does logAbandoned log? References: <470FC72F.5030602@marine.rutgers.edu> <470FE09D.3000408@hanik.com> <471365BE.3030608@marine.rutgers.edu> <4713B65D.309@marine.rutgers.edu> <4717D0FE.9050700@hanik.com> <4718ABC7.4030700@marine.rutgers.edu> In-Reply-To: <4718ABC7.4030700@marine.rutgers.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org DBCP doesn't remove abandoned connections until you reach maxActive, so you need to set your maxactive to something low that you can hit pretty easily Filip Wm.A.Stafford wrote: > Filip, > Thanks for the reply. Here is my code: > BasicDataSource ds = new BasicDataSource(); > ds.setDriverClassName(bundle.getString("Driver")); > ds.setUsername(bundle.getString("UserStr")); > ds.setPassword(bundle.getString("PwdStr")); > ds.setUrl( bundle.getString("URLStr")); > ds.setRemoveAbandoned(true); > ds.setRemoveAbandonedTimeout(30); > ds.setLogAbandoned(true); > > When I start the app I do see a message on sysout indicating the > abandoned settings: > AbandonedObjectPool is used > (org.apache.commons.dbcp.AbandonedObjectPool@987a33) > LogAbandoned: true > RemoveAbandoned: true > RemoveAbandonedTimeout: 30 > Date set:Sat Oct 20 00:00:00 EDT 2007 > > But, as I said earlier, I don't see any other logging when the app > is running or subsequently shut down. > > -=bill > > > Filip Hanik - Dev Lists wrote: >> you must also set >> >> *removeAbandoned*="true" >> >> Filip >> >> Wm.A.Stafford wrote: >>> I am trying to track down a connection leak in a Tomcat app that >>> uses dbcp. I was hoping that logging abandoned connections would >>> give some clue as to where the leak is occurring. I set >>> logAbandoned to be true and removeAbandonedTimeout to 30. I added >>> Connection c = getConnection() with no c.close() to a servlet. I >>> was expecting to see some sort of logging whenever this servlet >>> handled a request but I have seen nothing in any of the usual logs. >>> Where do the stack traces get logged? Is my test case sufficient to >>> cause logging? I am using dbcp1.2.2. >>> >>> Thanks, >>> -=bill >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org >>> For additional commands, e-mail: user-help@commons.apache.org >>> >>> >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org >> For additional commands, e-mail: user-help@commons.apache.org >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > For additional commands, e-mail: user-help@commons.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org