"org.jboss.cache.lock.TimeoutException: Unable to acquire lock on Fqn" in JBoss EAP log

Solution Unverified - Updated -


  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 5.x
  • Red Hat JBoss Enterprise SOA Platform (SOA)
    • 5.x


  • 2nd level cache: TimeoutException Unable to acquire lock on Fqn
  • The following error is logged on a remote cluster member when writing to JBoss Cache

    ERROR [org.jboss.cache.interceptors.TxInterceptor] (Incoming-123,MyPartition, prepare failed!
    org.jboss.cache.lock.TimeoutException: Unable to acquire lock on Fqn [/foo/bar] after [15000] milliseconds for requestor [GlobalTransaction:<>:2222]! Lock held by [GlobalTransaction:<>:1111]
    at org.jboss.cache.mvcc.MVCCNodeHelper.acquireLock(MVCCNodeHelper.java:157)


Structure the cache to minimize concurrent access to the same node, particularly from threads on different cluster members.

Some bugs in JBoss Cache prior to JBoss EAP 5.2 and JBoss SOA 5.3.1, could also cause this issue in certain situations even when the application did not have concurrent access to the same cache node.

Root Cause

Another thread is already holding the write lock on the listed node, preventing the current thread from completing its transaction.

If the threads are waiting on locks the other thread holds, they will deadlock until one of them times out (in which case it will get this exception, and the other thread may complete).

Since JBoss Cache locks only the local cluster member except when committing the transaction, threads on different nodes writing to the same cache node simultaneously can cause this deadlock.

Diagnostic Steps

Log every time a node lock is acquired and released:

    <category name="org.jboss.cache.lock.MVCCLockManager">
        <priority value="TRACE"/>

Log the transaction, so "GlobalTransaction:<>:123" can be associated with a thread:

    <category name="org.jboss.cache.transaction.TransactionTable">
        <priority value="TRACE"/>

Log the cache operation being called:

    <category name="org.jboss.cache.interceptors.InvocationContextInterceptor">
        <priority value="TRACE"/>

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.