Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 60753 invoked from network); 16 Oct 2005 14:15:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Oct 2005 14:15:43 -0000 Received: (qmail 53506 invoked by uid 500); 16 Oct 2005 14:15:41 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 53488 invoked by uid 500); 16 Oct 2005 14:15:41 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 53477 invoked by uid 99); 16 Oct 2005 14:15:40 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Oct 2005 07:15:40 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=HTML_10_20,HTML_MESSAGE,MAILTO_TO_SPAM_ADDR,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of michael.campbell@gmail.com designates 72.14.204.197 as permitted sender) Received: from [72.14.204.197] (HELO qproxy.gmail.com) (72.14.204.197) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Oct 2005 07:15:41 -0700 Received: by qproxy.gmail.com with SMTP id d8so297799qbc for ; Sun, 16 Oct 2005 07:15:19 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=aDgJ3xjNMXSOYSTtoXdbJPMzctxBco5BJYDo2/oRGdV2SkNUerwlCQ8/CaL8l1+kzZkaPlAXJwH3XqxfLBlEbqWHK5u9+GthLGYES/GAgmhFGU7kCMzyt8tPZSGwP9NmzmHKUouMrdluZnV2/D7gKg8yBFTCVtHKhE3HQMJlw5Y= Received: by 10.65.203.14 with SMTP id f14mr1180632qbq; Sun, 16 Oct 2005 07:15:19 -0700 (PDT) Received: by 10.65.133.20 with HTTP; Sun, 16 Oct 2005 07:15:19 -0700 (PDT) Message-ID: <811f2f1c0510160715l455751cev8bfc9bd7c6829b48@mail.gmail.com> Date: Sun, 16 Oct 2005 10:15:19 -0400 From: Michael Campbell To: user-java@ibatis.apache.org Subject: Re: No operations allowed after connection closed. In-Reply-To: <10m4l15d1h31nplfqom5b74tqa80tb47on@4ax.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_12269_30261649.1129472119270" References: <762ca9ae0510160531q413fdbaexf86326422dcd7d2@mail.gmail.com> <20051016124320.17060.qmail@web50002.mail.yahoo.com> <10m4l15d1h31nplfqom5b74tqa80tb47on@4ax.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_12269_30261649.1129472119270 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 10/16/05, Sven Boden wrote: > > If you're not yet using autoReconnect in the URL of your pool, can you > try using that. As in the following way: > > jdbc:mysql://host/db_hame?autoReconnect=3Dtrue > > Note the upper case R in autoReconnect (it's case sensitive). Your suggestion here got me intrigued, as I am using an older version of th= e driver, so decided to go look at the docs for this. MySql warns: (emphasis mine) If enabled the driver will throw an exception for a queries issued on a stale or dead connection, which belong to the current transaction, but will attempt reconnect before the next query issued on the connection in a new transaction. The use of this feature is not recommended, because it has sid= e effects related to session state and data consistency when applications don'thandle SQLExceptions properly, and is only designed to be used when yo= u are unable to configure your application to handle SQLExceptions resulting from dead and/or stale connections properly. Alternatively, investigate setting the MySQL server variable "wait_timeout"to some high value rather than the default of 8 hours. Still, if it fixes the OP's original problem, so much the better I guess. -- I tend to view "truly flexible" by another term: "Make everything equally hard". -- DHH ------=_Part_12269_30261649.1129472119270 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline

On 10/16/05, Sven Boden <l= ist123@pandora.be> wrote:
>
> If you're not yet using a= utoReconnect in the URL of your pool, can you
> try using that. As in= the following way:
>
>  jdbc:mysql://host/db_hame?autoReconnect=3Dtrue
>
>= Note the upper case R in autoReconnect (it's case sensitive).

Your = suggestion here got me intrigued, as I am using an older version of the dri= ver, so decided to go look at the docs for this.

MySql warns:  (emphasis mine)

If enabled the driver will throw an exception for a queries issued on a stale or dead connection, which belong to the current transaction, but will attempt reconnect before the next query issued on the connection in a new transaction. The use of this feature is not recommended, because it has side effects related to session state and data consistency when applications don'thandle SQLExceptions properly, and is only designed to be used when you are unable to configure your application to handle SQLExceptions resulting from dead and/or stale connections properly. Alternatively, investigate setting the MySQL server variable "wait_timeout"to so= me high value rather than the default of 8 hours.


Still, if it fixes the OP's original problem, so much the better I guess.
--
I tend to view "truly flexible" by another term: &qu= ot;Make everything equally hard". -- DHH
------=_Part_12269_30261649.1129472119270--