Getting error: ISPN000299: Unable to acquire lock after X seconds for key [B0x033E2B3732653264... on Red Hat JBoss Data Grid 7.x?

Solution Verified - Updated -

Environment

  • Red Hat JBoss Data Grid (JDG)
    • 7.x

Issue

  • How to avoid ISPN000299 error code?
  • How to increase acquire-timeout configuration?
  • How to change locking mechanisms in Red Hat JBoss Data Grid 7.x?

Resolution

From the Red Hat JBoss Data Grid 7.x Administration and Configuration Guide, Chapter 17. Locking:

Red Hat JBoss Data Grid 7.x provides locking mechanisms to prevent dirty reads (where a transaction reads an outdated value before another transaction has applied changes to it) and non-repeatable reads.

In Remote Client-Server mode, locking is configured using the locking element within the cache tags (for example, invalidation-cache, distributed-cache, replicated-cache or local-cache).

In order to switch the locking configuration, change the acquire-timeout parameter in the clustered.xml or standalone.xml file, which can be found in ${JDG_INSTANCE/configuration} as the example below:

...
 <locking acquire-timeout="30000"
          concurrency-level="1000"
          striping="false" />
          <!-- Additional configuration here -->
...

In the Red Hat JBoss Data Grid 7.x Administration and Configuration Guide, Appendix E. Configuration Recommendations the default timeout value for lockAcquisitionTimeout is 10 seconds.

Root Cause

Lock timeouts occur either when it takes longer than the acquire-timeout seconds configured or when there are a lot of contentions for the same key (or both).

Diagnostic Steps

Search for the ISPN000299 error code at server log, which can be found in ${JDG_INSTANCE}/log/server.log. For example, on Linux:

cat server.log | grep -i ISPN000299

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.

Comments