Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 86620 invoked from network); 4 Feb 2009 19:32:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Feb 2009 19:32:18 -0000 Received: (qmail 72269 invoked by uid 500); 4 Feb 2009 19:32:07 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 71877 invoked by uid 500); 4 Feb 2009 19:32:06 -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 71866 invoked by uid 99); 4 Feb 2009 19:32:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Feb 2009 11:32:06 -0800 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_HOTMAIL_RCVD2,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jak-tomcat-user@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Feb 2009 19:31:58 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LUnTB-0000H2-2j for users@tomcat.apache.org; Wed, 04 Feb 2009 19:31:33 +0000 Received: from 76-10-178-193.dsl.teksavvy.com ([76.10.178.193]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Feb 2009 19:31:33 +0000 Received: from ebenze by 76-10-178-193.dsl.teksavvy.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Feb 2009 19:31:33 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: users@tomcat.apache.org From: "Eric B." Subject: Re: dbcp pool freezing Date: Wed, 4 Feb 2009 14:31:08 -0500 Lines: 53 Message-ID: References: <0AAE5AB84B013E45A7B61CB66943C17215B600C148@USEA-EXCH7.na.uis.unisys.com> <0AAE5AB84B013E45A7B61CB66943C17215B604A5F4@USEA-EXCH7.na.uis.unisys.com> <4989DF6B.3030201@christopherschultz.net> X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 76-10-178-193.dsl.teksavvy.com X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-RFC2646: Format=Flowed; Original Sender: news X-Virus-Checked: Checked by ClamAV on apache.org "Christopher Schultz" wrote in message news:4989DF6B.3030201@christopherschultz.net... > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Eric, > > Eric B. wrote: >> I'm happy to test out an validate that theory, but based on what I've >> seen >> so far, this isn't the case at all. > > Try deploying nothing in your application but the following JSP. Browse > to it, and intentionally leak a connection. Watch your catalina.out file > to see if an error message occurs ~20 seconds later. If you see such > messages, Chuck's suggestion that you have some runaway looping code are > probably something to look into. Thanks for the pointers. After a bit more troubleshooting, I finally got the abandoned connection tracking to work, and indeed managed to find a connection leak in a very obscure place (not in a loop). However, during this process I noticed the following: The abandoned connection tracking only seems to fire when requesting a new connection. It is not a seperate background thread that cleans up abandoned connections. Consequently, if all connections are being legitimately used when a new one is requested, the new one will go into a wait state. Once a legit connection is closed, the thread waiting for a connection will be able to continue processing. However, if all the connection pool is maxed out with leak'ed connections that have not exceeded the abandonedTimeout, the thread requesting a new connection will go into a wait state and wait perpetually until a second new thread tries to access a connection and triggers the abandoned connection cleanup. I realize that the abandoned connection tracking is not something that a good app should rely upon, however, it is definitely a useful feature to have to ensure that your app doesn't crap out. However, it is a little misleading in the belief that abandoned connections will automatically be returned to the pool automatically rather than only be returned once a new connection is requested. Has there ever been any thought to doing abandoned connection tracking as a background thread, or was the current implementation decided upon to save on resources? Thanks! Eric --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org