How does idle-timeout-minutes work in a datasource ?

Solution Verified - Updated -

Issue

  • What is idle-timeout-minutes in datasource configuration ?
  • Why is the connection not removed after idle-timeout-minutes ?
  • Why is DestroyedCount always 0 for a data source which has not set max-pool-size and min-pool-size ?
  • What is use of idle-timeout-minutes in datasource?
  • We are relying on idle-timeout-minutes to flush idle connections and get below errors:
IO Error: End of TNS data channel; nested exception is java.sql.SQLRecoverableException: IO Error: End of TNS data channel
...
Closed Connection; nested exception is java.sql.SQLRecoverableException: Closed Connection
  • How to set idle timeout in a data source?
  • What is the meaning of the following TRACE event?
<TIMESTAMP> TRACE [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (IdleRemover) Destroying timedout connection org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@3b729fa1[state=NORMAL managed connection=org.jboss.jca.adapters.jdbc.local.LocalManagedConnection@624e2184 connection handles=0 lastUse=1388075895091 trackByTx=false pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@42b996d7 pool internal context=SemaphoreArrayListManagedConnectionPool@3a6f01bf[pool=<POOL NAME>]
  • want to know when the connections would drop to 0, is it when the idle timeout kicks in ?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 5
    • 6
    • 7
  • EAP 5
    • idle-timeout-minutes as defined in a *-ds.xml
  • EAP 6 and later
    • idle-timeout-minutes as defined in
      • jboss-as-resource-adapters_1_*.xsd
      • jboss-as-datasources_1_*.xsd

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content