X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id B3A1D9FB215 for ; Wed, 12 Jul 2006 08:45:14 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 15714-08 for ; Wed, 12 Jul 2006 08:45:04 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.228]) by postgresql.org (Postfix) with ESMTP id CCFF19FB2D8 for ; Wed, 12 Jul 2006 08:45:04 -0300 (ADT) Received: by wr-out-0506.google.com with SMTP id 68so92173wri for ; Wed, 12 Jul 2006 04:45:02 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=OIZ0/eoJ/oSFLdVcGBM4UfpHNW0vBjM7/6YHyCxref+Zh1/RAuc9V9B75Z5xR5VN74uajj4RBd4NxyEibbPu56lZY0AypvD49xjJCP8mz6Y9yeLTiQ9eCrhNT3W9EJTCbgnEuS57dlY992bXEOLaHqbQrTxUJljGm4d5VKyl0vY= Received: by 10.82.109.9 with SMTP id h9mr61957buc; Wed, 12 Jul 2006 04:45:01 -0700 (PDT) Received: by 10.78.142.7 with HTTP; Wed, 12 Jul 2006 04:45:01 -0700 (PDT) Message-ID: Date: Wed, 12 Jul 2006 08:45:01 -0300 From: "Lucas Sousa" To: "Oliver Jowett" Subject: Re: executeQuery Locked Cc: pgsql-jdbc@postgresql.org In-Reply-To: <44B483D4.3050001@opencloud.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_10535_5332076.1152704701531" References: <44B483D4.3050001@opencloud.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/47 X-Sequence-Number: 15473 ------=_Part_10535_5332076.1152704701531 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I am debugging the driver myself, I am looking into the PhantomReferences that I think may be the cause of the problem (the problem seems to me loosely related with the garbage collector frequency) If I do the "set statement_timeout = 60000" on that connection I suppose that after I release this connection back to the pool and another thread fetches it the statement timeout will remain set ... is it not? But it is good to know that I am not crazy.... On 7/12/06, Oliver Jowett wrote: > > Lucas Sousa wrote: > > > stm.setQueryTimeout( timeout ); > > > It seems to me that for some (weird) reason, the query timeout is bein > > achieved without throwing any error or the postgresql driver detecting > > that. > > > > This is some know issue? > > Unfortunately setQueryTimeout() is currently a no-op. As a workaround, > set the server's statement_timeout variable. > > > Thread [zzzzzzz:12] (Suspended) > > SocketInputStream.socketRead0(FileDescriptor, byte[], int, int, int) > > line: not available [native method] > > SocketInputStream.read(byte[], int, int) line: not available > > BufferedInputStream.fill() line: not available > > BufferedInputStream.read() line: not available > > PGStream.ReceiveChar() line: 256 > > QueryExecutorImpl.processResults(ResultHandler, int) line: 1164 > > The driver is waiting for results from the server. Either the query is > still running or something has got confused about what's happening at > the protocol level. > > Can you reproduce this with loglevel=2 set (as a URL parameter, see the > driver docs)? Or a tcpdump/snoop/ethereal capture of the connection with > the server when it gets stuck would also be useful. Also, if you could > attach to the corresponding backend via gdb or similar and get a stack > trace that may help. > > -O > ------=_Part_10535_5332076.1152704701531 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I am debugging the driver myself, I am looking into the PhantomReferences that I think may be the cause of the problem (the problem seems to me loosely related with the garbage collector frequency)

If I do the "set statement_timeout = 60000" on that connection I suppose that after I release this connection back to the pool and another thread fetches it the statement timeout will remain set ... is it not?

But it is good to know that I am not crazy....


On 7/12/06, Oliver Jowett <oliver@opencloud.com > wrote:
Lucas Sousa wrote:

>             stm.setQueryTimeout( timeout );

> It seems to me that for some (weird) reason, the query timeout is bein
> achieved without throwing any error or the postgresql driver detecting
> that.
>
> This is some know issue?

Unfortunately setQueryTimeout() is currently a no-op. As a workaround,
set the server's statement_timeout variable.

> Thread [zzzzzzz:12] (Suspended)
>     SocketInputStream.socketRead0(FileDescriptor, byte[], int, int, int)
> line: not available [native method]
>     SocketInputStream.read(byte[], int, int) line: not available
>     BufferedInputStream.fill() line: not available
>     BufferedInputStream.read() line: not available
>     PGStream.ReceiveChar() line: 256
>     QueryExecutorImpl.processResults(ResultHandler, int) line: 1164

The driver is waiting for results from the server. Either the query is
still running or something has got confused about what's happening at
the protocol level.

Can you reproduce this with loglevel=2 set (as a URL parameter, see the
driver docs)? Or a tcpdump/snoop/ethereal capture of the connection with
the server when it gets stuck would also be useful. Also, if you could
attach to the corresponding backend via gdb or similar and get a stack
trace that may help.

-O

------=_Part_10535_5332076.1152704701531--