xa-datasource creates connections more than max-pool-size setting after connection validation failure

Solution Unverified - Updated

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.0.9
    • 7.1.x

Issue

After connections are closed by validate-on-match, prefill can create new connections more than max-pool-size (e.g. double size of the max number) when using xa-datasource.

Resolution

This issue has been registered as Content from issues.jboss.org is not included.JBEAP-15328.

This can be workaround by using SemaphoreArrayListManagedConnectionPool, which was used by default in EAP 6, as a managed connection pool implementation for xa-datasource. See also EAP 7.1 Configuration Guide - 15.5. Configure Managed Connection Pools for details. For example, the mcp can be changed with CLI command as below:

/subsystem=datasources/xa-data-source=<DATASOURCE>:write-attribute(name=mcp,value=org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool)

Root Cause

Diagnostic Steps

This issue can be occurred with the following conditions:

  • using xa-datasource
  • validate-on-match is enabled (not background-validation)
  • prefill is enabled

You can compare max-pool-size and the connection count by netstat or ActiveCount as datasource statistics (How to monitor DataSource connection pool statistics in JBoss EAP).

If all of the connections are closed by validation, the connections will be increased to twice the number of the max-pool-size after prefill happens. This is because that the number of excessed connection is based on the number of closed connection by validate-on-match.

Components
Category

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.