This property, in combination with the other properties,
are used to configure how the Wrapper monitors a JVM for deadlocked threads.
This can be very useful to detect and then work around potentially fatal problems
which would otherwise be difficult if not impossible to work around.
Thread deadlock checks require that at least Java version 1.5 is used.
Only JVMs will ignore the checks.
Checking for Deadlocks is fairly quick, but it does involve briefly
locking and taking a snapshot of all threads so this property is FALSE by default.
Example: (Deadlock Check: Off) |
wrapper.check.deadlock=FALSE
|
Simple Example:
Please read over the property details below,
but the following simple example will configure the Wrapper to log the location of a deadlock
and then immediately restart the JVM.
Example: |
wrapper.check.deadlock=TRUE
wrapper.check.deadlock.interval=60
wrapper.check.deadlock.action=RESTART
wrapper.check.deadlock.output=FULL
|
Deadlock?:
Deadlocks can occur when two or more threads are locking resources in an order
which results in all threads waiting indefinitely.
The simplest example is where
Thread A locks Object A and then attempts to lock Object B,
while another Thread B has Object B locked and is waiting to lock Object A.
In this case, Thread A will never release Object A because it is waiting for Object B.
This will never happen because Thread B will keep Object B locked indefinitely
as it waits for Object A to become available.
|