Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 22434 invoked from network); 15 Aug 2005 18:33:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Aug 2005 18:33:42 -0000 Received: (qmail 8975 invoked by uid 500); 15 Aug 2005 18:33:39 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 8935 invoked by uid 500); 15 Aug 2005 18:33:39 -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 8871 invoked by uid 99); 15 Aug 2005 18:33:38 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Aug 2005 11:33:38 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [64.145.111.196] (HELO mail.emeta.com) (64.145.111.196) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Aug 2005 11:33:55 -0700 Received: by mail.emeta.com (Postfix, from userid 32767) id AA448853FE; Mon, 15 Aug 2005 14:33:06 -0400 (EDT) Received: from voodoo.internal.emeta.com (voodoo.internal.emeta.com [192.168.1.45]) by mail.emeta.com (Postfix) with ESMTP id 84419853F6 for ; Mon, 15 Aug 2005 14:33:02 -0400 (EDT) X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C5A1C7.E5111816" Subject: RE: ThrottledPool handing Date: Mon, 15 Aug 2005 14:33:24 -0400 Message-ID: <58B82FFBB0291C4CA3FDB050FEF8084474E8D9@voodoo.internal.emeta.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: ThrottledPool handing Thread-Index: AcWhvVi5clPGi3NPSI6SgGao2pdZiwACbECAAAAyDCg= From: "Adam Gugliciello" To: X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on mail.emeta.com X-Spam-Level: X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-5.7 required=2.9 tests=ALL_TRUSTED,BAYES_00, HTML_80_90,HTML_MESSAGE,MIME_QP_LONG_LINE autolearn=ham version=3.0.2 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------_=_NextPart_001_01C5A1C7.E5111816 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable good point, it may be excepting and losing sessions, I'll close the = sessions in a finally block. ________________________________ From: Niels Beekman [mailto:n.beekman@wis.nl] Sent: Mon 8/15/05 2:29 PM To: user-java@ibatis.apache.org Subject: RE: ThrottledPool handing Adam, =20 Can you simulate what happens when =20 > t.execute(this.sqlMapClient) =20 throws an exception, so before you explicitly close the session? =20 Niels =20 ________________________________ From: Clinton Begin [mailto:clinton.begin@gmail.com]=20 Sent: maandag 15 augustus 2005 19:19 To: user-java@ibatis.apache.org Subject: Re: FW: =20 Why does it take a minute to get a connection? With a connection pool, = it should literally be milliseconds.... Clinton On 8/15/05, Adam Gugliciello wrote: Under a heavy sustained load, the sqlmaps ThrottledPool seems to start = to bind, the the vast majority of them binding up and blocking waiting = to build a new session, and stay blocked long after the fact, even days = after the request has been abandoned. Any help would be appreciated, and = I am attaching a thread dump. =20 My code looks like: =20 private void executeSqlMapTemplate(SqlMapTemplate t) throws = SQLException { final Connection c =3D = this._dbPool.borrowConnection("QuestionnaireCustomerApi", 1 * 60 * 1000l); // Waits a minute for a = connection if (c =3D=3D null) { throw new IllegalStateException("Unable to retrieve JDBC = Connection from db pool."); } try { SqlMapSession sess=3Dthis.sqlMapClient.openSession(c); t.execute(this.sqlMapClient); sess.close(); =20 } finally { =20 this._dbPool.returnConnection(c); } } =20 =20 ------_=_NextPart_001_01C5A1C7.E5111816 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable =0A= =0A= =0A= =0A= =0A= =0A= =0A= =0A= =0A= =0A= =0A= =0A= =0A= =0A=
=0A=
good point, = it may be =0A= excepting and losing sessions, I'll close the sessions in a finally =0A= block.
=0A=

=0A=
=0A= From: Niels Beekman =0A= [mailto:n.beekman@wis.nl]
Sent: Mon 8/15/05 2:29 = PM
To: =0A= user-java@ibatis.apache.org
Subject: RE: ThrottledPool =0A= handing

=0A=
=0A=
=0A=

Adam,

=0A=

 

=0A=

Can you = simulate what =0A= happens when

=0A=

 

=0A=

> =0A= t.execute(this.sqlMapClient)

=0A=

 

=0A=

throws an = exception, so =0A= before you explicitly close the session?

=0A=

 

=0A=

Niels

=0A=

 

=0A=
=0A=
=0A=
=0A=
=0A=

From: Clinton =0A= Begin [mailto:clinton.begin@gmail.com]
Sent: maandag 15 augustus 2005 =0A= 19:19
To: =0A= user-java@ibatis.apache.org
Subject: Re: = FW:

=0A=

 

=0A=


Why does it take a minute = to get a =0A= connection?  With a connection pool, it should literally be =0A= milliseconds....

Clinton

=0A=
=0A=

On 8/15/05, Adam Gugliciello <AdamG@emeta.com> =0A= wrote:

=0A=
=0A=
=0A=

Under a = heavy =0A= sustained load, the sqlmaps ThrottledPool seems to start to bind, the = the vast =0A= majority of them binding up and blocking waiting to build a new session, = and =0A= stay blocked long after the fact, even days after the request has been =0A= abandoned. Any help would be appreciated, and I am attaching a thread =0A= dump.

=0A=
=0A=
=0A=
=0A=

 

=0A=
=0A=

My code looks =0A= like:

=0A=
=0A=

 

=0A=
=0A=

 private void =0A= executeSqlMapTemplate(SqlMapTemplate t) throws =0A= SQLException
    =0A= {
        final Connection c =0A= =3D
           =      =0A= this._dbPool.borrowConnection("QuestionnaireCustomerApi",
  =             &= nbsp;         =0A= 1 * 60 * 1000l); // Waits a minute for a =0A= connection
        if (c =3D=3D =0A= null)
        =0A= {
            = throw =0A= new IllegalStateException("Unable to retrieve JDBC Connection from db =0A= pool.");
        =0A= }
        =0A= try
        =0A= {
            =0A= SqlMapSession =0A= sess=3Dthis.sqlMapClient.openSession(c);
     = ;       =0A= t.execute(this.sqlMapClient);
      &nbs= p;     =0A= sess.close();

=0A=
=0A=

 

=0A=
=0A=

        =0A= }
        =0A= finally
        = {

=0A=
=0A=

 

=0A=
=0A=

           = =0A= this._dbPool.returnConnection(c);
      =   =0A= }
    }

=0A=
=0A=

 

=0A=


=0A=

 

=0A= =0A= =0A= =0A= =0A= ------_=_NextPart_001_01C5A1C7.E5111816--