db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <rick.hille...@oracle.com>
Subject Re: Force condition: ERROR 08000: Connection closed by unknown interrupt
Date Thu, 20 Oct 2011 12:28:59 GMT
On 10/20/11 4:59 AM, Phil Bradley wrote:
> Hi,
> I have an application that uses Derby in embedded mode.
> Occasionally, I run into the condition:
> java.sql.SQLNonTransientConnectionException: Connection closed by
> unknown interrupt
> ...
> Caused by: ERROR 08000: Connection closed by unknown interrupt.
> My understanding is that this state occurs if a thread accessing the
> database gets interrupted. As a workaround, the application has some
> logic which detects when this occurs and handles it by:
> 1. Closing all connections
> 2. Shutting down the database (new DerbyShutdownRunner().shutdown())
> 3. Recreating the connections
Hi Phil,

I'm interested in why you have chosen this workaround. If Derby's 
interrupt handling is working correctly, then the database and all other 
connections to it should be fine. Probably the interrupted connection is 
fine too and you have only lost the transaction which was running in the 
interrupted connection. Of course, Derby may not be performing the way 
we think it should be. Could you explain why you chose this expensive 

Please bear with me, I do not understand the following paragraph:
> At the moment, this doesn't address the problem. Specifically, even
> after taking these steps, the exception gets thrown after every database
> operation.
When I read that sentence, I get the impression that the 08000 exception 
is being thrown on every JDBC call. Is that right?
>   It's quite possible that there's a flaw in the implementation
> of the above steps but the meta issue is that I don't have a way to test
> this logic as I don't have a way to force the error condition.
This is what is confusing me. I thought that the previous sentence said 
that you were reliably experiencing the error, on every JDBC call.

> So, my question is, is there a way that I can reliably force the
> application into the above state in order to test its ability to recover
> from it?
> Thanks,
> Phil

View raw message