From: Oliver Jowett <oliver@opencloud.com>
To: Akhil Srinivasan <akhilss@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: prepareCall hangs
Date: Tue, 21 Jun 2005 12:19:59 +1200
Message-ID: <42B75D2F.50407@opencloud.com> (raw)
In-Reply-To: <ad76b9f205062009157b83571e@mail.gmail.com>
References: <ad76b9f205062009157b83571e@mail.gmail.com>
Akhil Srinivasan wrote:
> CallableStatement proc = con.prepareCall("{ ? = call
> \"insAccount\" ( ? ) }");
>
> proc.registerOutParameter(1, Types.OTHER);
> proc.setString(2,userName);
> this.registerCallableStatementForCancel(proc);
> logger.debug("registerCallableStatementForCancel(): exit"+userName);
> /* another thread will call statement.cancel() if timeout exceeded*/
> proc.execute();
> this.unregisterCallableStatementForCancel(proc);
> logger.debug("unregisterCallableStatementForCancel():
> exit"+userName);
> ResultSet rset = (ResultSet)proc.getObject(1);
>
> Occasionally the prepareCall just hangs, as logging statements show that
> it does not enter the execute().
I find this unlikely as prepareCall doesn't do any I/O or thread-related
work. It could be getting stuck in a loop, but it seems odd that it
would only happen intermittently. More likely seems to be that you have
a problem in registerCallableStatementForCancel.
Can you add more logging immediately before calling
registerCallableStatementForCancel() to eliminate that possibility?
Alternatively, can you get a thread dump (on Linux/Solaris, send a
SIGQUIT to the Java process) when it hangs? That'd show us exactly where
things have stopped.
-O
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: oliver@opencloud.com, akhilss@gmail.com
Subject: Re: prepareCall hangs
In-Reply-To: <42B75D2F.50407@opencloud.com>
References: <ad76b9f205062009157b83571e@mail.gmail.com> <42B75D2F.50407@opencloud.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