Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 95778 invoked from network); 15 Aug 2005 17:19:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Aug 2005 17:19:07 -0000 Received: (qmail 77517 invoked by uid 500); 15 Aug 2005 17:19:06 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 77187 invoked by uid 500); 15 Aug 2005 17:19:05 -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 77174 invoked by uid 99); 15 Aug 2005 17:19:05 -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 10:19:05 -0700 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=HTML_60_70,HTML_MESSAGE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of clinton.begin@gmail.com designates 64.233.184.198 as permitted sender) Received: from [64.233.184.198] (HELO wproxy.gmail.com) (64.233.184.198) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Aug 2005 10:19:25 -0700 Received: by wproxy.gmail.com with SMTP id i28so1140050wra for ; Mon, 15 Aug 2005 10:19:02 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:references; b=rXbzNfMljyfixQiUfguiXkJTMy1Q3+tL53AItmuk8c9ApRi3og/0IBWZn1VTksg8zpTjRw8x9ZFlc+fT776Yy4N3t7lI6Jjad84C/pVbxUof5Jvs2Ye+IIzIPwXSLnI9lphoFMWJntp0/+/8rmF8eEm9dAdplkAlVtusGyqdS8o= Received: by 10.54.30.40 with SMTP id d40mr3711112wrd; Mon, 15 Aug 2005 10:19:02 -0700 (PDT) Received: by 10.54.93.11 with HTTP; Mon, 15 Aug 2005 10:19:02 -0700 (PDT) Message-ID: <16178eb105081510193ff0d72e@mail.gmail.com> Date: Mon, 15 Aug 2005 11:19:02 -0600 From: Clinton Begin Reply-To: cbegin@ibatis.com To: user-java@ibatis.apache.org Subject: Re: FW: In-Reply-To: <58B82FFBB0291C4CA3FDB050FEF8084474E8CF@voodoo.internal.emeta.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_378_33451986.1124126342201" References: <58B82FFBB0291C4CA3FDB050FEF8084474E8CF@voodoo.internal.emeta.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_378_33451986.1124126342201 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Why does it take a minute to get a connection? With a connection pool, it= =20 should literally be milliseconds.... Clinton On 8/15/05, Adam Gugliciello wrote: >=20 > Under a heavy sustained load, the sqlmaps ThrottledPool seems to start t= o=20 > bind, the the vast majority of them binding up and blocking waiting to bu= ild=20 > a new session, and stay blocked long after the fact, even days after the= =20 > request has been abandoned. Any help would be appreciated, and I am=20 > attaching a thread dump. > My code looks like: > private void executeSqlMapTemplate(SqlMapTemplate t) throws SQLExceptio= n > { > 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= =20 > db pool."); > } > try > { > SqlMapSession sess=3Dthis.sqlMapClient.openSession(c); > t.execute(this.sqlMapClient); > sess.close(); > } > finally > { > this._dbPool.returnConnection(c); > } > } > =20 > ------=_Part_378_33451986.1124126342201 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
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 <AdamG@emeta.com> wrote:
Under a heavy sustained load,=20 the sqlmaps ThrottledPool seems to start to bind, the the vast majority of = them=20 binding up and blocking waiting to build a new session, and stay blocked lo= ng=20 after the fact, even days after the request has been abandoned. Any help wo= uld=20 be appreciated, and I am attaching a thread dump.
 
My code looks=20 like:
 
 private void=20 executeSqlMapTemplate(SqlMapTemplate t) throws=20 SQLException
   =20 {
        final Connection c=20 =3D
           &n= bsp;   =20 this._dbPool.borrowConnection("QuestionnaireCustomerApi",
&nbs= p;            &= nbsp;          1 * 60 * 1000l); // Waits a minute for a connection
   &n= bsp;    if (c =3D=3D=20 null)
       =20 {
            thr= ow=20 new IllegalStateException("Unable to retrieve JDBC Connection from db= =20 pool.");
       =20 }
       =20 try
       =20 {
           =20 SqlMapSession=20 sess=3Dthis.sqlMapClient.openSession(c);
     &= nbsp;     =20 t.execute(this.sqlMapClient);
       =     =20 sess.close();
 
     &n= bsp; =20 }
       =20 finally
        {
 
     &n= bsp;     =20 this._dbPool.returnConnection(c);
      &n= bsp;=20 }
    }
 
=


------=_Part_378_33451986.1124126342201--