From: | Akhil Srinivasan <akhilss(at)gmail(dot)com> |
---|---|
To: | Oliver Jowett <oliver(at)opencloud(dot)com> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: prepareCall hangs |
Date: | 2005-06-24 14:53:57 |
Message-ID: | ad76b9f205062407533e9f3551@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Hi,
Problem solved, the connection pool was running out of connections as we
were catching the exception after the connections were released.
Thanks to all for the help.
Akhil Srinivasan
On 6/21/05, Oliver Jowett <oliver(at)opencloud(dot)com> wrote:
>
> 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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Akhil Srinivasan | 2005-06-24 15:00:33 | Re: Problems with temporary tables created in callable functions |
Previous Message | Frank Beullens | 2005-06-24 13:06:11 | Re: Problem with version 8 Driver |