Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 10819 invoked from network); 10 Jan 2007 14:04:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Jan 2007 14:04:49 -0000 Received: (qmail 18065 invoked by uid 500); 10 Jan 2007 14:04:42 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 17889 invoked by uid 500); 10 Jan 2007 14:04:42 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 17878 invoked by uid 99); 10 Jan 2007 14:04:41 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jan 2007 06:04:41 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of ekemokai@gmail.com designates 64.233.162.233 as permitted sender) Received: from [64.233.162.233] (HELO nz-out-0506.google.com) (64.233.162.233) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jan 2007 06:04:32 -0800 Received: by nz-out-0506.google.com with SMTP id x7so91403nzc for ; Wed, 10 Jan 2007 06:04:12 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=oBJxW1IDt+E+th8baGJYKJWCtbvAQIpJWrh3tYHE3uFXqZJ36ByEmSQg3wHw11ZqLWSlOoU9IdTsi1VPoc9owPStvb942CGKFbMXuCPpT2JTaw9gjUm03sQFvIuVU2WFmKJfltGtaLvoNOcpiSoZqLrlEXSt5z5J2G1rASQpYN4= Received: by 10.64.131.4 with SMTP id e4mr466651qbd.1168437851924; Wed, 10 Jan 2007 06:04:11 -0800 (PST) Received: by 10.65.186.8 with HTTP; Wed, 10 Jan 2007 06:04:11 -0800 (PST) Message-ID: Date: Wed, 10 Jan 2007 09:04:11 -0500 From: "EDMOND KEMOKAI" To: "Tomcat Users List" Subject: Re: How to forcibly close abandoned database connections? In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3874_757922.1168437851883" References: X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_3874_757922.1168437851883 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline It is possible that whatever procedure is responsible for checking for abandoned connections only does so when there is actual need for a connection, similar to how a garbage collector works to reclaim memory. If there is no seeming stress on the connection resources then it would make sense not to jump the gun to look for and recycle abandoned connections. Of course I don't know if that is what is happening, but I suspect it might be. On 1/10/07, David Uctaa wrote: > > Perhaps I was unclear what it is I'm trying to do. I have a > connection pool set up under Tomcat 5.5, connecting to DB2 on an > iSeries box using Tomcat's DBCP. It is set up for 30 connections. I > am using Lambda Probe (a great open source Tomcat monitoring app) to > monitor the datasources. It is showing, let's say, that there are a > max of 30 connections allowed, that 11 have been "established", and 9 > are "busy". I know that these 9 are due to a connection pool leak bug > that was corrected (but not yet deployed), so even though the > application has gone idle and no one is using it, the connections > remain "busy" indefinitely. I have enabled removeAbandoned in my > server.xml, but according to the Tomcat docs, abandoned connections > are only recycled if there is a need for them, due to the number of > available datasources getting low. The number of available > datasources are not yet low, so these orphaned connections are still > being reported as "busy". I'm a little bit anal with regard to > keeping things kinda clean on the server, so I would like to have > these abandoned connections no longer reported as "busy" once they are > orphaned. Is there a way to find and recycle abandoned connections > forcibly? > > Thanks, > David > > On 1/8/07, David Uctaa wrote: > > Tomcat provides the removeAbandoned and removeAbandonedTimeout > > parameters when setting up data sources in server.xml. But according > > to the documentation I've read, abandoned connections only get closed > > and recycled when available connections run low and new connections > > are requested. > > > > Is there a way for me to forcibly close/release abandoned connections > > on the server from a privileged application running on the same > > server? > > > > BTW, I'm running Tomcat 5.5 on a Windows 2003 box, running against DB2 > > on an iSeries box (jt400 for the JDBC driver), using Tomcat's DBCP for > > the pooling. > > > > Thanks, > > David > > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > -- "talk trash and carry a small stick." PAUL KRUGMAN (NYT) ------=_Part_3874_757922.1168437851883--