X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id D6A7E9DCBBE for ; Fri, 13 Jan 2006 12:24:52 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 36844-05 for ; Fri, 13 Jan 2006 12:24:46 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by postgresql.org (Postfix) with SMTP id BB29D9DC89D for ; Fri, 13 Jan 2006 12:24:45 -0400 (AST) Received: (qmail 14343 invoked from network); 13 Jan 2006 16:24:44 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 13 Jan 2006 16:24:44 -0000 In-Reply-To: <1333D619-AD12-4200-859F-7D9C347F5D50@clickspace.com> References: <1333D619-AD12-4200-859F-7D9C347F5D50@clickspace.com> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: multipart/alternative; boundary=Apple-Mail-6--51507008 Message-Id: Cc: pgsql-jdbc@postgresql.org From: Dave Cramer Subject: Re: Lockup fetching from database Date: Fri, 13 Jan 2006 11:24:42 -0500 To: Brendan Duddridge X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.127 required=5 tests=[AWL=0.126, HTML_MESSAGE=0.001] X-Spam-Score: 0.127 X-Spam-Level: X-Archive-Number: 200601/57 X-Sequence-Number: 14508 --Apple-Mail-6--51507008 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Hi Brendan, I'd be looking at the underlying cause before timing out. This is a pretty robust system usually. There is a query timeout in the backend if that is causing the problem. Is this a very long query ? Dave On 13-Jan-06, at 10:56 AM, Brendan Duddridge wrote: > Hi, > > I'm running PostgreSQL 8.1 on OS X Server 10.4.3 using > postgresql-8.1-404.jdbc3.jar and I'm experiencing some lockups when > querying from the database through our java WebObjects program. > > Here is a dump of the thread where the problem occurs: > > "CSThreadPoolThread-0" prio=5 tid=0x00563ab0 nid=0x1894600 runnable > [f1111000..f1112ac0] > at java.net.SocketInputStream.socketRead0(Native Method) > at java.net.SocketInputStream.read(SocketInputStream.java:129) > at java.io.BufferedInputStream.fill > (BufferedInputStream.java:183) > at java.io.BufferedInputStream.read > (BufferedInputStream.java:201) > - locked <0x541cb7f8> (a java.io.BufferedInputStream) > at org.postgresql.core.PGStream.ReceiveChar(PGStream.java:254) > at org.postgresql.core.v3.QueryExecutorImpl.processResults > (QueryExecutorImpl.java:1163) > at org.postgresql.core.v3.QueryExecutorImpl.execute > (QueryExecutorImpl.java:188) > - locked <0x541c8860> (a > org.postgresql.core.v3.QueryExecutorImpl) > at org.postgresql.jdbc2.AbstractJdbc2Statement.execute > (AbstractJdbc2Statement.java:430) > at > org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags > (AbstractJdbc2Statement.java:332) > at org.postgresql.jdbc2.AbstractJdbc2Statement.execute > (AbstractJdbc2Statement.java:324) > at > com.webobjects.jdbcadaptor.JDBCChannel._bindInputVariablesWithBindings > AndExecute(JDBCChannel.java:237) > at > com.webobjects.jdbcadaptor.JDBCChannel._evaluateExpression > (JDBCChannel.java:303) > at com.webobjects.jdbcadaptor.JDBCChannel.evaluateExpression > (JDBCChannel.java:261) > at com.webobjects.eoaccess.EOUtilities._rawRowsForSQL > (EOUtilities.java:584) > at com.webobjects.eoaccess.EOUtilities.rawRowsForSQL > (EOUtilities.java:550) > at > ca.shopshop.ssmodel.Merchant.deactivateProductsForMerchantHavingNoOthe > rMerchantOffers(Merchant.java:614) > at ca.shopshop.ssmodel.Merchant.deactivateMerchant > (Merchant.java:685) > at MerchantAccountStatusCheckerThread.performAction > (MerchantAccountStatusCheckerThread.java:131) > at > com.clickspace.csutilities.threads.DatabaseUpdateThread.run > (DatabaseUpdateThread.java:41) > at com.clickspace.csutilities.threads.CSThreadPool > $ThreadPoolThread.run(CSThreadPool.java:200) > > So it seems that it's locking up retrieving data from the database. > Is there a timeout parameter or something that can be set so if it > takes too long to retrieve from the database I can handle an > exception and continue on with my program? Right now all the other > threads in my application start to block waiting for this one to > complete and eventually my entire application instance locks up. > > Thanks, > > ____________________________________________________________________ > Brendan Duddridge | CTO | 403-277-5591 x24 | brendan@clickspace.com > > ClickSpace Interactive Inc. > Suite L100, 239 - 10th Ave. SE > Calgary, AB T2G 0V9 > > http://www.clickspace.com > --Apple-Mail-6--51507008 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 Hi Brendan,

I'd be looking at the = underlying cause before timing out. This is a pretty robust system = usually.


There is a query timeout in = the backend if that is causing the problem.
Is this a very = long query ?

Dave
On = 13-Jan-06, at 10:56 AM, Brendan Duddridge wrote:

Hi,

I'm running PostgreSQL 8.1 = on OS X Server 10.4.3 using=A0postgresql-8.1-404.jdbc3.jar=A0and I'm = experiencing some lockups when querying from the database through our = java WebObjects program.

Here is a dump of the = thread where the problem occurs:

"CSThreadPoolThread-0" = prio=3D5 tid=3D0x00563ab0 nid=3D0x1894600 runnable = [f1111000..f1112ac0]
=A0=A0 =A0=A0 =A0at = java.net.SocketInputStream.socketRead0(Native Method)
=A0 =A0 = =A0 =A0 at = java.net.SocketInputStream.read(SocketInputStream.java:129)
=A0 = =A0 =A0 =A0 at = java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
=A0= =A0 =A0 =A0 at = java.io.BufferedInputStream.read(BufferedInputStream.java:201)
=A0= =A0 =A0 =A0 - locked <0x541cb7f8> (a = java.io.BufferedInputStream)
=A0 =A0 =A0 =A0 at = org.postgresql.core.PGStream.ReceiveChar(PGStream.java:254)
=A0 = =A0 =A0 =A0 at = org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.= java:1163)
=A0 =A0 =A0 =A0 at = org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:18= 8)
=A0 =A0 =A0 =A0 - locked <0x541c8860> (a = org.postgresql.core.v3.QueryExecutorImpl)
=A0 =A0 =A0 =A0 at = org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement= .java:430)
=A0 =A0 =A0 =A0 at = org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2= Statement.java:332)
=A0 =A0 =A0 =A0 at = org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement= .java:324)
=A0 =A0 =A0 =A0 at = com.webobjects.jdbcadaptor.JDBCChannel._bindInputVariablesWithBindingsAndE= xecute(JDBCChannel.java:237)
=A0 =A0 =A0 =A0 at = com.webobjects.jdbcadaptor.JDBCChannel._evaluateExpression(JDBCChannel.jav= a:303)
=A0 =A0 =A0 =A0 at = com.webobjects.jdbcadaptor.JDBCChannel.evaluateExpression(JDBCChannel.java= :261)
=A0 =A0 =A0 =A0 at = com.webobjects.eoaccess.EOUtilities._rawRowsForSQL(EOUtilities.java:584)
=A0 =A0 =A0 =A0 at = com.webobjects.eoaccess.EOUtilities.rawRowsForSQL(EOUtilities.java:550)
=A0 =A0 =A0 =A0 at = ca.shopshop.ssmodel.Merchant.deactivateProductsForMerchantHavingNoOtherMer= chantOffers(Merchant.java:614)
=A0 =A0 =A0 =A0 at = ca.shopshop.ssmodel.Merchant.deactivateMerchant(Merchant.java:685)
=A0 =A0 =A0 =A0 at = MerchantAccountStatusCheckerThread.performAction(MerchantAccountStatusChec= kerThread.java:131)
=A0 =A0 =A0 =A0 at = com.clickspace.csutilities.threads.DatabaseUpdateThread.run(DatabaseUpdate= Thread.java:41)
=A0 =A0 =A0 =A0 at = com.clickspace.csutilities.threads.CSThreadPool$ThreadPoolThread.run(CSThr= eadPool.java:200)

So it seems that it's = locking up retrieving data from the database. Is there a timeout = parameter or something that can be set so if it takes too long to = retrieve from the database I can handle an exception and continue on = with my program? Right now all the other threads in my application start = to block waiting for this one to complete and eventually my entire = application instance locks up.

Thanks,

_________________________________________________________= ___________
Brendan Duddridge=A0| CTO | 403-277-5591 x24 | =A0brendan@clickspace.com =

ClickSpace = Interactive Inc.
Suite L100, 239 - 10th Ave. SE
Calgary, AB = =A0T2G 0V9

http://www.clickspace.com=A0
=


= --Apple-Mail-6--51507008--