JBoss - Java heap retention in PeriodicRecovery thread's '_xidScans' HashTable

Solution Verified - Updated

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 5.1.x

Issue

  • We're receiving OutOfMemoryErrors, and the heap dump shows the heap being consumed by the PeriodicRecovery thread's HashTable called '_xidScans'

  • The server.log shows DEBUG messages like the following:

          DEBUG [org.jboss.resource.connectionmanager.ManagedConnectionFactoryDeployment] (Thread-19) Unable to execute isValid() due to null
    

Resolution

  • Use a JDBC 4 compliant database driver (compiled with JDK 1.6) that provides the java.sql.Connection.isValid(int) method
    • For db2 drivers, they would need to be version 9.5 or later. See http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=%2Fcom.ibm.db2.luw.wn.doc%2Fdoc%2Fc0052012.html
  • Acquire the fix to JBTM-924 to address relevant recovery leaks. Upgrade to EAP 5.2.0+ or the following one-offs are available:

Root Cause

Diagnostic Steps

Components
Tags

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.