You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Marshall Pierce <ma...@genius.com> on 2010/01/12 02:52:25 UTC

jdbc persistence hangs with error about using a closed statement

I filed a Jira case about this a while ago, but nothing's happened on
it. https://issues.apache.org/activemq/browse/AMQ-2534

This happened most often on less-active environments which leads me to
think it's related to some inactivity timeout or something. Let me know
if I can help diagnose it.

Re: jdbc persistence hangs with error about using a closed statement

Posted by Marshall Pierce <ma...@genius.com>.
On 01/12/2010 02:06 AM, Gary Tully wrote:
> Hi Marshall,
> can you add your configuration to that jira. I wonder/could a jdbc pool
> timeout or periodic check help to ensure that expired connections are reaped
> by the pool before being returned to the jdbc persistence adapter?
> 
> Do you find that the symptom is unrecoverable, that is, you see the stack
> traces repeated and only a restart will clear it?
> 
> 
> 2010/1/12 Marshall Pierce <ma...@genius.com>
> 
>> I filed a Jira case about this a while ago, but nothing's happened on
>> it. https://issues.apache.org/activemq/browse/AMQ-2534
>>
>> This happened most often on less-active environments which leads me to
>> think it's related to some inactivity timeout or something. Let me know
>> if I can help diagnose it.
>>
> 
> 
> 

I've updated the Jira with the config.
Once the issue has happened, no messages flow at all. I'm not sure if it
will refuse to accept more messages or if the problem is restricted to
not being able to dequeue messages, but either way, I haven't found a
way to fix it without restarting.

It's possible that a periodic check would help, but if connections were
timing out, that would be a different exception. Mysql will complain if
you use an expired connection by saying something along the lines of
"It's been 561264 seconds since the last packet". In another project I'm
using C3P0 for jdbc pooling and I've configured periodic testing like so:
c3p0.preferredTestQuery = (trivial query)
That and autoReconnect=true in the jdbc url solved my connection timeout
issues, but that problem had a different root exception that clearly
identified the problem as a connection timeout.

Re: jdbc persistence hangs with error about using a closed statement

Posted by Gary Tully <ga...@gmail.com>.
Hi Marshall,
can you add your configuration to that jira. I wonder/could a jdbc pool
timeout or periodic check help to ensure that expired connections are reaped
by the pool before being returned to the jdbc persistence adapter?

Do you find that the symptom is unrecoverable, that is, you see the stack
traces repeated and only a restart will clear it?


2010/1/12 Marshall Pierce <ma...@genius.com>

> I filed a Jira case about this a while ago, but nothing's happened on
> it. https://issues.apache.org/activemq/browse/AMQ-2534
>
> This happened most often on less-active environments which leads me to
> think it's related to some inactivity timeout or something. Let me know
> if I can help diagnose it.
>



-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com