You configure the amount of time a transaction waits before timing out
with the derby.locks.waitTimeout property. When configuring
your database or system, you should consider these properties together. For
example, in order for any deadlock checking to occur, the derby.locks.deadlockTimeout property
must be set to a value lower than the derby.locks.waitTimeout property.
If it is set to a value equal to or higher than the derby.locks.waitTimeout,
the transaction times out before does
any deadlock checking.
DeadlocksdetectingBy default, derby.locks.waitTimeout is
set to 60 seconds. -1 is the equivalent of no wait timeout. This means that
transactions never time out, although can
choose a transaction as a deadlock victim.
One possible configuration:
deadlock checking occurs when a transaction has waited 30 seconds; no lock
wait timeouts occur.
This illustration depicts
one possible configuration: deadlock checking occurs when a transaction has
waited 30 seconds; no lock wait timeouts occur.
Another typical configuration:
deadlock checking occurs after a transaction has waited 60 seconds for a lock;
after 90 seconds, the transaction times out and is rolled back.
This illustration depicts
another typical configuration: deadlock checking occurs after a transaction
has waited 60 seconds for a lock; after 90 seconds, the transaction times
out and is rolled back.
A configuration in which
no deadlock checking occurs: transactions time out after they have waited
50 seconds. No deadlock checking occurs.
This illustration depicts
a configuration in which no deadlock checking occurs: transactions time out
after they have waited 50 seconds. No deadlock checking occurs.