1 Reply Latest reply on Aug 16, 2010 11:43 AM by Nathan Ciliberto

    How to prevent JBoss Cache lock TimeoutException/deadlocks

    Wei Xue Newbie

      Hi,

       

      We are using JBoss Cache 3.2.0 in our application which is deployed on JBoss 5.1.0.GA  AS. I have setup JBoss clustering using farm deployment

      with two nodes running in a cluster.

       

      During load testing, we encountered lockTimeoutException on both nodes. I grabbed a piece of information from server.log on two nodes.

      Node 1:

      2010-07-21 08:31:34,841 WARN  [com.arjuna.ats.arjuna.logging.arjLoggerI18N] (pool-22-thread-560) [com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_2] TwoPhaseCoordinator.beforeCompletion - failed for com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple@746fee83

      org.jboss.cache.lock.TimeoutException: Unable to acquire lock on Fqn [/serverData/31510/serverParams] after [15000] milliseconds for requestor [GlobalTransaction:<10.17.223.88:58023>:3586]! Lock held by [GlobalTransaction:<10.17.223.89:55770>:3588]

       

      Node 2:

      2010-07-21 08:31:32,064 WARN  [com.arjuna.ats.arjuna.logging.arjLoggerI18N] (Thread-37) [com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_2] TwoPhaseCoordinator.beforeCompletion - failed for com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple@2fdc3f43

      org.jboss.cache.lock.TimeoutException: Unable to acquire lock on Fqn [/serverData/31510/serverParams] after [15000] milliseconds for requestor [GlobalTransaction:<10.17.223.89:55770>:3588]! Lock held by [GlobalTransaction:<10.17.223.88:58023>:3586]

       

      You can find they are blocked by each other. Conceptually one should get a lock, and the other will get lock TimeoutException. But why no one

      get this lock?

       

      Here is my jboss cache configuration regarding the locking:

      <locking
          isolationLevel="REPEATABLE_READ"
          lockAcquisitionTimeout="15000"
          lockParentForChildInsertRemove="false"
          concurrencyLevel="5000"
          useLockStriping="false"
          />

       

      How to prevent this happen and why this happens?

       

       

      Thank you in advance,

      Wei