Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 65218 invoked from network); 15 Apr 2004 22:35:18 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 15 Apr 2004 22:35:18 -0000 Received: (qmail 93249 invoked by uid 500); 15 Apr 2004 22:34:47 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 93211 invoked by uid 500); 15 Apr 2004 22:34:46 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 93168 invoked from network); 15 Apr 2004 22:34:46 -0000 Received: from unknown (HELO sj-iport-5.cisco.com) (171.68.10.87) by daedalus.apache.org with SMTP; 15 Apr 2004 22:34:46 -0000 Received: from sj-core-4.cisco.com (171.68.223.138) by sj-iport-5.cisco.com with ESMTP; 15 Apr 2004 15:34:54 -0700 Received: from wells.cisco.com (wells.cisco.com [171.71.177.223]) by sj-core-4.cisco.com (8.12.10/8.12.6) with ESMTP id i3FMYmhE026206 for ; Thu, 15 Apr 2004 15:34:48 -0700 (PDT) Received: from danihuanw2k2 (dhcp-171-69-34-204.cisco.com [171.69.34.204]) by wells.cisco.com (8.8.6 (PHNE_14041)/CISCO.SERVER.1.2) with SMTP id PAA27385 for ; Thu, 15 Apr 2004 15:34:48 -0700 (PDT) From: "Daniel Huang" To: "Jakarta Commons Users List" Subject: RE: [dbcp] How could I find out the application methods that hold the active connections? Date: Thu, 15 Apr 2004 15:34:09 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <14B8A075A9E35D40B58E5BB746D6C4403430C4@tlg-01.tlg.ca> x-mimeole: Produced By Microsoft MimeOLE V6.00.2800.1409 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Sheng, Can you use HttpServlet.log() to output your messages, instead of sending it to stderr? If you, in your server.xml, put , Everything gets written to stderr or stdout will go to Catalina.out. See http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html for more detail on tomcat configuration. And you probably want to direct tomcat related questions to tomcat mailing list to get more prompt help. Regards, Daniel -----Original Message----- From: Sheng Huang [mailto:SHuang@tlg.ca] Sent: Thursday, April 15, 2004 10:44 AM To: 'Jakarta Commons Users List' Subject: RE: [dbcp] How could I find out the application methods that hold the active connections? Hi Dirk, The problem is that catalina.out records connections not closed, but not the connections borrowed (the stderr messages containing which method borrowed a connection for my analysis of connection leaking). Best regards, Sheng -----Original Message----- From: Dirk Verbeeck [mailto:dirk.verbeeck@pandora.be] Sent: April 15, 2004 12:41 PM To: Jakarta Commons Users List Subject: Re: [dbcp] How could I find out the application methods that hold the active connections? On Linux it's even easier. There should be a $CATALINA_BASE/logs/catalina.out file already. Regards Dirk Sheng Huang wrote: > Hi Dirk, > > Thank you very much for your reply. However, I am running my application on > a Linux box. I always use ./catalina.sh start because the Tomcat process > started with "./catalina.sh run" or "./catalina.sh run &" will get > terminated when the shell window timeouts or gets closed. > > Is there a workaround with "./catalina.sh run" so that I can redirect the > stderr log? Thank you very much. > > Best regards, > Sheng > > -----Original Message----- > From: Dirk Verbeeck [mailto:dirk.verbeeck@pandora.be] > Sent: April 14, 2004 2:13 PM > To: Jakarta Commons Users List > Subject: Re: [dbcp] How could I find out the application methods that > hold the active connections? > > > Try: > catalina run >stdout.log 2>stderr.log > > Cheers > Dirk > > > Sheng Huang wrote: > > >>Hi Dirk, >> >>Thank you very much for your reply. Now I understand the connections > > closed > >>in my configuration are active connections instead of inactive > > connections. > >>Although I see a lot of "DBCP object created was never >>closed" followed by "Already closed" as I said in my first email, all >>connections will become active after the application is used for some time >>and then the application stalls (wait unlimited for available > > connections). > >>There may be some defects in my code, thus the stacktrace for DBCP object >>creation will be very helpful to me. Since I just installed Tomcat 4.1.18 >>with the default configuration (standalone Tomcat instead of Tomcat and >>Apache), I can't see the stderr messages logged somewhere and don't know > > how > >>to set it up. Could you give me some information on how to setup stderr >>logging or redirect them to the standard catalina.out? Thank you very > > much. > >>Best regards, >>Sheng >> >> >> >>When you get a "DBCP object created..." message then there should also be > > a > >>stacktrace be written. With version 1.1 the message goes to stdout and the >>stacktrace to stderr. In the nightly builds they go both go to stderr. >> >>The stacktrace displays the location where is abandoned connection was >>borrowed. >> >> >>The removeAbandoned parameter is for removing the active connections. >>Idle connections are removed with "minEvictableIdleTimeMillis". >> >>-- Dirk >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org >>For additional commands, e-mail: commons-user-help@jakarta.apache.org >> >> >> > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-user-help@jakarta.apache.org > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-user-help@jakarta.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org