Stanley, all of these options - except the append - are already set, but there 
was no more information about this in the logs:

>>>     -Dderby.storage.pageCacheSize=2500
>>>     -Dderby.stream.error.logSeverityLevel=0
>>>     -Dderby.locks.waitTimeout=3600
>>>     -Dderby.locks.deadlockTrace=true
>>>     -Dderby.locks.monitor=true

According to the timestamps, Derby waited for the configured 3600 seconds 
without any deadlock trace output and then printed the lock timeout. All logs 
should be in derby.log?! The java.logging-Level is set to INFO and there is 
also nothing in it.

Am Freitag, 6. Juli 2007 schrieb Stanley Bradbury:
> Hi -
> The lock debug property names are misleading.  You will be able to get
> victim/blocker lock information for lock timeouts as well as deadlocks
> by setting deadlockTrace (I think).  Anyway, if you set all of the
> properties below you will get more information about the lock timeouts
> than is in the log snippet you posted.  Here's the relevant settings
> from my Development properties file:
>
> #  -- 1. Append to the log file rather than overwriting it - manually
> remove
> #  -- the derby.log when it becomes large
> derby.infolog.append=true
> #  -- 2. Log all errors/messages of any severity (will list deadlocks)
> derby.stream.error.logSeverityLevel=0
> #  -- . Log all deadlocks
> derby.locks.monitor=true
> # -- . Writes a stack trace of all threads involved in lock problems
> # --  (not just the victims) to the log
> derby.locks.deadlockTrace=true

[...]

> >> Kurt Huwig wrote:
> >>> Hi there,
> >>>
> >>> I try to debug lock timeouts but am completely clueless. I use these
> >>> Derby settings:
> >>>
> >>>   -Dderby.storage.pageCacheSize=2500
> >>>   -Dderby.stream.error.logSeverityLevel=0
> >>>   -Dderby.locks.waitTimeout=3600
> >>>   -Dderby.locks.deadlockTrace=true
> >>>   -Dderby.locks.monitor=true
> >>>
> >>> and this for the connections:
> >>>
> >>>   Connection.TRANSACTION_READ_UNCOMMITTED
> >>>
> >>> The application is multi-threaded, multi-connection and using the
> >>> Embedded driver. Is there a way to show which statements lock each
> >>> other? I suspect that a ResultSet is still open somewhere.
> >>>
> >>> This is from the derby.log:
> >>>
> >>> 2007-07-05 04:50:05.196 GMT Thread[SPONTS-278,5,main] (XID = 80082776),
> >>> (SESSIONID = 37), (DATABASE = SPONTS), (DRDAID = null), Cleanup action
> >>> starting
> >>> 2007-07-05 04:50:05.196 GMT Thread[SPONTS-278,5,main] (XID = 80082776),
> >>> (SESSIONID = 37), (DATABASE = SPONTS), (DRDAID = null), Failed
> >>> Statement is: INSERT INTO journal
> >>> (id,ip,sender,recipient,mailsender,mailfrom,mailto,cc,bcc,replyto,maild
> >>>at
> >>> e,receiveddate,subject,totallength,attachments,spamscore,status,reason)
> >>> VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,
> >>> ?) with 18 parameters [...]
> >>> ERROR 40XL1: A lock could not be obtained within the time requested
> >>>         at
> >>> org.apache.derby.iapi.error.StandardException.newException(Unknown
> >>> Source)
> >>>         at
> >>> org.apache.derby.impl.services.locks.LockSet.lockObject(Unknown Source)
> >>>         at
> >>> org.apache.derby.impl.services.locks.SinglePool.lockAnObject(Unknown
> >>> Source) at
> >>> org.apache.derby.impl.services.locks.SinglePool.lockObject(Unknown
> >>> Source)
> >>>         at
> >>> org.apache.derby.impl.store.raw.xact.RowLocking2.lockContainer(Unknown
> >>> Source)
> >>>         at
> >>> org.apache.derby.impl.store.raw.data.BaseContainerHandle.useContainer(U
> >>>nk nown Source)
> >>>         at
> >>> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(
> >>>Un known Source)
> >>>         at
> >>> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(
> >>>Un known Source)
> >>>         at
> >>> org.apache.derby.impl.store.raw.xact.Xact.openContainer(Unknown Source)
> >>>         at
> >>> org.apache.derby.impl.store.access.conglomerate.OpenConglomerate.init(U
> >>>nk nown Source)
> >>>         at org.apache.derby.impl.store.access.heap.Heap.open(Unknown
> >>> Source) at
> >>> org.apache.derby.impl.store.access.RAMTransaction.openConglomerate(Unkn
> >>>ow n Source)
> >>>         at
> >>> org.apache.derby.impl.store.access.RAMTransaction.openCompiledConglomer
> >>>at e(Unknown Source)
> >>>         at
> >>> org.apache.derby.impl.sql.execute.RowChangerImpl.openForUpdate(Unknown
> >>> Source)
> >>>         at
> >>> org.apache.derby.impl.sql.execute.RowChangerImpl.open(Unknown Source)
> >>>         at
> >>> org.apache.derby.impl.sql.execute.RowChangerImpl.open(Unknown Source)
> >>>         at
> >>> org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unkn
> >>>ow n Source)
> >>>         at
> >>> org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
> >>>         at
> >>> org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown
> >>> Source)
> >>>         at
> >>> org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown
> >>> Source)
> >>>         at
> >>> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unkn
> >>>ow n Source)
> >>>         at
> >>> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown
> >>> Source)
> >>>
> >>> 2007-07-05 04:51:05.461 GMT Thread[SMTP-out,5,main] (XID = 80083917),
> >>> (SESSIONID = 37), (DATABASE = SPONTS), (DRDAID = null), Cleanup action
> >>> starting
> >>> 2007-07-05 04:51:05.461 GMT Thread[SMTP-out,5,main] (XID = 80083917),
> >>> (SESSIONID = 37), (DATABASE = SPONTS), (DRDAID = null), Failed
> >>> Statement is: SELECT reason FROM journal WHERE id=? with 1 parameters
> >>> begin parameter #1: 111394B19A14-0 :end parameter
> >>> ERROR 40XL1: A lock could not be obtained within the time requested
> >>>         at
> >>> org.apache.derby.iapi.error.StandardException.newException(Unknown
> >>> Source)
> >>>         at
> >>> org.apache.derby.impl.services.locks.LockSet.lockObject(Unknown Source)
> >>>         at
> >>> org.apache.derby.impl.services.locks.SinglePool.lockAnObject(Unknown
> >>> Source) at
> >>> org.apache.derby.impl.services.locks.SinglePool.lockObject(Unknown
> >>> Source)
> >>>         at
> >>> org.apache.derby.impl.store.raw.xact.RowLocking2.lockContainer(Unknown
> >>> Source)
> >>>         at
> >>> org.apache.derby.impl.store.raw.data.BaseContainerHandle.useContainer(U
> >>>nk nown Source)
> >>>         at
> >>> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(
> >>>Un known Source)
> >>>         at
> >>> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(
> >>>Un known Source)
> >>>         at
> >>> org.apache.derby.impl.store.raw.xact.Xact.openContainer(Unknown Source)
> >>>         at
> >>> org.apache.derby.impl.store.access.conglomerate.OpenConglomerate.init(U
> >>>nk nown Source)
> >>>         at org.apache.derby.impl.store.access.heap.Heap.open(Unknown
> >>> Source) at
> >>> org.apache.derby.impl.store.access.RAMTransaction.openConglomerate(Unkn
> >>>ow n Source)
> >>>         at
> >>> org.apache.derby.impl.store.access.RAMTransaction.openCompiledConglomer
> >>>at e(Unknown Source)
> >>>         at
> >>> org.apache.derby.impl.store.access.btree.index.B2IForwardScan.init(Unkn
> >>>ow n Source)
> >>>         at
> >>> org.apache.derby.impl.store.access.btree.index.B2I.openScan(Unknown
> >>> Source)
> >>>         at
> >>> org.apache.derby.impl.store.access.RAMTransaction.openScan(Unknown
> >>> Source)
> >>>         at
> >>> org.apache.derby.impl.store.access.RAMTransaction.openCompiledScan(Unkn
> >>>ow n Source)
> >>>         at
> >>> org.apache.derby.impl.sql.execute.TableScanResultSet.openScanController
> >>>(U nknown Source)
> >>>         at
> >>> org.apache.derby.impl.sql.execute.TableScanResultSet.openCore(Unknown
> >>> Source) at
> >>> org.apache.derby.impl.sql.execute.IndexRowToBaseRowResultSet.openCore(U
> >>>nk nown Source)
> >>>         at
> >>> org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unk
> >>>no wn Source)
> >>>         at
> >>> org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(Unknown
> >>> Source)
> >>>         at
> >>> org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown
> >>> Source)
> >>>         at
> >>> org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown
> >>> Source)
> >>>         at
> >>> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unkn
> >>>ow n Source)
> >>>         at
> >>> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown
> >>> Source)
-- 
Mit freundlichen Grüßen

Kurt Huwig (Vorstand)
Telefon 0681/96751-50, Telefax 0681/96751-66
http://www.iku-ag.de/

iKu Systemhaus AG, Am Römerkastell 4, 66121 Saarbrücken
Amtsgericht: Saarbrücken, HRB 13240
Vorstand: Kurt Huwig, Andreas Niederländer
Aufsichtsratsvorsitzender: Jan Bankstahl

GnuPG 1024D/99DD9468 64B1 0C5B 82BC E16E 8940  EB6D 4C32 F908 99DD 9468

Reply via email to