db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendle...@amberpoint.com>
Subject Re: Lock Timeout
Date Sat, 07 Jul 2007 17:49:59 GMT
> all of these options - except the append - are already set, but there 
> was no more information about this in the logs:

DERBY-666 describes at least one case in which these properties
don't provide all the information that you might wish.
https://issues.apache.org/jira/browse/DERBY-666

For diagnosing my own application's locking behavior, I have found
SYSCS_DIAG.LOCK_TABLE (aka org.apache.derby.diag.LockTable) to
be extremely helpful:
http://db.apache.org/derby/docs/dev/ref/rrefsyscsdiagtables.html

Here's another nice page on the LockTable VTI:
http://publib.boulder.ibm.com/infocenter/cldscp10/topic/com.ibm.cloudscape.doc/hubprnt57.htm

What I have done is to catch the lock timeout error, and in the catch
handling I have some code that dumps the lock table information to
a simple text file. By reading that file I have learned a lot about what
locks are being held.

Also, depending on whether you are on Unix or Windows, it is useful to
combine this with using either "kill -QUIT" or "Control-Break" to get
a live stack trace of the threads in your application at the time of
the lock timeout.

Hope this helps!

thanks,

bryan


Mime
View raw message