From: Dave Cramer <davec@visibleassets.com>
To: James Im <im-james@hotmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: SQL query never ends
Date: Wed, 9 Aug 2006 10:10:10 -0400
Message-ID: <A8CEAC33-64A7-425F-A658-DDBADB5352D6@visibleassets.com> (raw)
In-Reply-To: <BAY7-F1410A721FD61F05F6F9BE396550@phx.gbl>
References: <BAY7-F1410A721FD61F05F6F9BE396550@phx.gbl>
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 = stmt.executeQuery("select true");
>
> The query is not important: it fails with any type of query, at
> 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 = 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
> postgresql.
>
> I've enabled jdbc logging with "loglevel=2" and this is what I get:
>
> simple execute,
> handler=org.postgresql.jdbc2.AbstractJdbc2Statement
> $StatementResultHandler@996cca,
> maxRows=0, fetchSize=0, flags=17
> FE=> Parse(stmt=null,query="i've remove the select query",oids={})
> FE=> Bind(stmt=null,portal=null)
> FE=> Describe(portal=null)
> FE=> Execute(portal=null,limit=0)
> FE=> Sync
>
> .. and nothing else. No "<=BE ..." follow the " FE=> Sync" log entry.
>
>
> I've also tried to put "stmt.setQueryTimeout(3);" but it doesn't
> 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
> tell me
> how to solve it. If I'm right, could you try to fix it?
>
> _________________________________________________________________
> Log på MSN Messenger direkte på nettet: http://webmessenger.msn.com
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that
> your
> message can get through to the mailing list cleanly
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: davec@visibleassets.com, im-james@hotmail.com
Subject: Re: SQL query never ends
In-Reply-To: <A8CEAC33-64A7-425F-A658-DDBADB5352D6@visibleassets.com>
References: <BAY7-F1410A721FD61F05F6F9BE396550@phx.gbl> <A8CEAC33-64A7-425F-A658-DDBADB5352D6@visibleassets.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox