X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 4DA8A9FB27A for ; Wed, 9 Aug 2006 11:28:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 78489-08 for ; Wed, 9 Aug 2006 14:28:29 +0000 (UTC) X-Greylist: delayed 00:18:14.27195 by SQLgrey- Received: from ebox1b.ebox.com (ebox1.ebox.com [64.7.141.6]) by postgresql.org (Postfix) with ESMTP id A07A19FB284 for ; Wed, 9 Aug 2006 11:28:29 -0300 (ADT) Received: from [192.168.1.2] (dcdsl.ebox.com [64.7.143.116]) by ebox1b.ebox.com (Postfix) with ESMTP id 5A01D179F08; Wed, 9 Aug 2006 10:10:12 -0400 (EDT) In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: Cc: pgsql-jdbc@postgresql.org Content-Transfer-Encoding: quoted-printable From: Dave Cramer Subject: Re: SQL query never ends Date: Wed, 9 Aug 2006 10:10:10 -0400 To: James Im X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200608/52 X-Sequence-Number: 15579 James, We will need more information in order to help you here. As Mark said, are you using this concurrently ? Dave On 9-Aug-06, at 6:21 AM, James Im wrote: > I'm experimenting a random problem on my PC. Sometimes a sql query > executed with Statement never returns. The code is blocked at a line > like this one: > > rs =3D stmt.executeQuery("select true"); > > The query is not important: it fails with any type of query, at =20 > random, > even with the one above. > > I never get an exception. > > Now the logs. I've enable logging at the database level and I have set > "statement_timeout =3D 3000". I have searched for the query in > postgresql's log but I cannot find the query which is blocking in my > java code so I guess that it means that the query never reached =20 > postgresql. > > I've enabled jdbc logging with "loglevel=3D2" and this is what I get: > > simple execute, > handler=3Dorg.postgresql.jdbc2.AbstractJdbc2Statement=20 > $StatementResultHandler@996cca, > maxRows=3D0, fetchSize=3D0, flags=3D17 > FE=3D> Parse(stmt=3Dnull,query=3D"i've remove the select = query",oids=3D{}) > FE=3D> Bind(stmt=3Dnull,portal=3Dnull) > FE=3D> Describe(portal=3Dnull) > FE=3D> Execute(portal=3Dnull,limit=3D0) > FE=3D> Sync > > .. and nothing else. No "<=3DBE ..." follow the " FE=3D> Sync" log = entry. > > > I've also tried to put "stmt.setQueryTimeout(3);" but it doesn't =20 > seem to > do anything. > > I'm using postgresql 8.1.4 on Windows 2000 Pro SP4 and the driver = is > "8.1-407 JDBC 3". I'm also using java 1.5.0_06-b05. > > > I guess that there is a bug in the driver. If I'm wrong, please =20 > tell me > how to solve it. If I'm right, could you try to fix it? > > _________________________________________________________________ > Log p=E5 MSN Messenger direkte p=E5 nettet: = http://webmessenger.msn.com > > > ---------------------------(end of =20 > broadcast)--------------------------- > TIP 1: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that =20 > your > message can get through to the mailing list cleanly >