Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 74091 invoked from network); 25 Jun 2005 22:25:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Jun 2005 22:25:20 -0000 Received: (qmail 80706 invoked by uid 500); 25 Jun 2005 22:25:17 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 80681 invoked by uid 500); 25 Jun 2005 22:25:17 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 80664 invoked by uid 99); 25 Jun 2005 22:25:17 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Jun 2005 15:25:17 -0700 Received: by ajax.apache.org (Postfix, from userid 99) id 4ADA414; Sun, 26 Jun 2005 00:25:16 +0200 (CEST) From: bugzilla@apache.org To: commons-dev@jakarta.apache.org Subject: DO NOT REPLY [Bug 28211] - [dbcp] Specifying the maximum lifetime of a connection X-Bugzilla-Reason: AssignedTo Message-Id: <20050625222516.4ADA414@ajax.apache.org> Date: Sun, 26 Jun 2005 00:25:16 +0200 (CEST) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=28211 ------- Additional Comments From mark@mysql.com 2005-06-26 00:25 ------- [snip] > This is particularly relevant for MySQL Connector/J 3.0.x which tries to apply > some weird automatic recovery when a MySQL connection has timed out, resulting > in all sorts of issues. Juergen, By _default_ Connector/J doesn't do any "automatic recovery" because of the issues you speak of. Unfortunately just about every FAQ and third-party component has decided to latch on to using autoReconnect=true instead of dealing with the real issue of handling stale connections, which is the same for _any_ JDBC vendor (i.e. either have the pool test connections before handing them out and take the performance hit, or do the "right" thing and actually handle SQLExceptions, because that's why they exist). > The best way to deal with this is to set the maximum > lifetime of a connection to 4 hours or the like: If it's older, simply kill Most people running MySQL in heavy-load production set it to a few _seconds_, because it only takes a few ms to create a connection, but an idle connection takes resources that could be used by some other active process. Unfortunately, as you note, DBCP has no straightforward way to enforce a max- connection lifetime or idle period, so you have to use maxIdle connections as a "crutch" of sorts (other pools such as Proxool (as you mention) or C3P0 have these features). -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org