db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kurt Huwig <k.hu...@iku-ag.de>
Subject Lock Timeout
Date Fri, 06 Jul 2007 10:51:21 GMT
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,maildate,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(Unknown 
Source)
        at 
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unknown 
Source)
        at 
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unknown 
Source)
        at org.apache.derby.impl.store.raw.xact.Xact.openContainer(Unknown 
Source)
        at 
org.apache.derby.impl.store.access.conglomerate.OpenConglomerate.init(Unknown 
Source)
        at org.apache.derby.impl.store.access.heap.Heap.open(Unknown Source)
        at 
org.apache.derby.impl.store.access.RAMTransaction.openConglomerate(Unknown 
Source)
        at 
org.apache.derby.impl.store.access.RAMTransaction.openCompiledConglomerate(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(Unknown 
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(Unknown 
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(Unknown 
Source)
        at 
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unknown 
Source)
        at 
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unknown 
Source)
        at org.apache.derby.impl.store.raw.xact.Xact.openContainer(Unknown 
Source)
        at 
org.apache.derby.impl.store.access.conglomerate.OpenConglomerate.init(Unknown 
Source)
        at org.apache.derby.impl.store.access.heap.Heap.open(Unknown Source)
        at 
org.apache.derby.impl.store.access.RAMTransaction.openConglomerate(Unknown 
Source)
        at 
org.apache.derby.impl.store.access.RAMTransaction.openCompiledConglomerate(Unknown 
Source)
        at 
org.apache.derby.impl.store.access.btree.index.B2IForwardScan.init(Unknown 
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(Unknown 
Source)
        at 
org.apache.derby.impl.sql.execute.TableScanResultSet.openScanController(Unknown 
Source)
        at 
org.apache.derby.impl.sql.execute.TableScanResultSet.openCore(Unknown Source)
        at 
org.apache.derby.impl.sql.execute.IndexRowToBaseRowResultSet.openCore(Unknown 
Source)
        at 
org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown 
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(Unknown 
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

Mime
View raw message