Configure the datasource idle-timeout-minutes property in EAP 6

Solution Verified - Updated -

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 6

Issue

  • How is the datasource property idle-timeout-minutes configured?
  • I was not able to add/configure the idle-timeout-minutes property.
  • By some load spike, ActiveCount increased. Then, after a while, ActiveCount doesn't decrease while InUseCount decreased. That means idle connections are not released from the connection pool. I want to release such connections from database resource perspective.

Resolution

Please set the idle-timeout-minutes attribute within the timeout element as follows :

                   ...
                   <security>
                        ...
                   </security>
                   <validation>
                        ...
                   </validation>
                   <timeout>
                        <!-- specify a value appropriate for system constraints/desired behavior -->
                        <idle-timeout-minutes>5</idle-timeout-minutes>
                   </timeout>
                   ...

References

Root Cause

  • The idle-timeout-minutes property hasn't been configured within the timeout element in the datasource configuration.

Diagnostic Steps

  • Please observe the following ERROR message in the server log :
ERROR [org.jboss.as.server] (Controller Boot Thread) JBAS015956: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: JBAS014676: Failed to parse configuration
    at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:141) [jboss-as-controller-7.3.2.Final-redhat-2.jar:7.3.2.Final-redhat-2]
    at org.jboss.as.server.ServerService.boot(ServerService.java:324) [jboss-as-server-7.3.2.Final-redhat-2.jar:7.3.2.Final-redhat-2]
    at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:253) [jboss-as-controller-7.3.2.Final-redhat-2.jar:7.3.2.Final-redhat-2]
    at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
Caused by: javax.xml.stream.XMLStreamException: org.jboss.as.connector.util.ParserException: IJ010061: Unexpected element: idle-timeout-minutes
    at org.jboss.as.connector.subsystems.datasources.DataSourcesExtension$DataSourceSubsystemParser.readElement(DataSourcesExtension.java:582)
    at org.jboss.as.connector.subsystems.datasources.DataSourcesExtension$DataSourceSubsystemParser.readElement(DataSourcesExtension.java:182)
    at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110) [staxmapper-1.1.0.Final-redhat-2.jar:1.1.0.Final-redhat-2]
    at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.handleAny(XMLExtendedStreamReaderImpl.java:69) [staxmapper-1.1.0.Final

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.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.