5 Replies Latest reply on May 25, 2007 11:59 PM by Howard Ungar

    MySQL Connection Problems under heavy load

    bob - Newbie

      System Environment:
      AppServer: Jboss 4.0.3 SP1
      MySql: Ver 12.22 Distrib 4.0.18, for suse-linux (i686)
      JDBC-Driver: mysql-connector-java-3.0.11-stable-bin.jar
      OS: SLES 9


      DataSource config in JBoss:

      <jndi-name>jdbc/xxx</jndi-name>
      <connection-url>jdbc:mysql://xxx:3306/xxx?autoReconnect=true</connection-url>
      <driver-class>com.mysql.jdbc.Driver</driver-class>
      <user-name>xxx</user-name>
      xxx
      <min-pool-size>5</min-pool-size>
      <max-pool-size>20</max-pool-size>
      </local-tx-datasource>



      Problem Description:
      Out application works perfectly since one year now but for the last five days we have a strange connection problem at 23:00 (11 pm) when the daily personalisation service starts. The service produces heavy load (working on db and sending mails). The first 5 minutes the service works without problems but then at 23:05 the exceptions occur (See below). Its so strange that everytime the connection problems occur after 5 minutes (nearly accurate to the milliseconds). The load to this moment is different and never the same, so why the connections problem at 23:05?

      Any ideas where the problem is and how to solve it?




      Stack-Trace:

      2007-03-15 23:05:00,199 WARN [org.jboss.tm.TransactionImpl] Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=, localId=2117] t
      imed out. status=STATUS_ACTIVE
      ...
      2007-03-15 23:05:00,224 WARN [net.sf.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: null
      2007-03-15 23:05:00,224 ERROR [net.sf.hibernate.util.JDBCExceptionReporter] Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2
      117, BranchQual=, localId=2117]; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=s
      b1-itp-080/2117, BranchQual=, localId=2117])
      2007-03-15 23:05:00,313 ERROR [net.sf.hibernate.util.JDBCExceptionReporter] Cannot open connection
      org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=, localId=2117]; - nested
      throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=, localId=211
      7])
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:79)
      at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
      at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:278)
      at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3302)
      at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3282)
      at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:61)
      at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:525)
      at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:432)
      at net.sf.hibernate.impl.ScheduledIdentityInsertion.execute(ScheduledIdentityInsertion.java:29)
      at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:932)
      at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:857)
      at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:775)
      at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:738)
      ...
      at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
      Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=, localId=2117]
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:331)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:462)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:894)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:73)
      ... 21 more
      ...
      ...
      2007-03-15 23:05:00,484 WARN [net.sf.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: null
      2007-03-15 23:05:00,484 ERROR [net.sf.hibernate.util.JDBCExceptionReporter] Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2
      117, BranchQual=, localId=2117]; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=s
      b1-itp-080/2117, BranchQual=, localId=2117])
      2007-03-15 23:05:00,553 ERROR [net.sf.hibernate.util.JDBCExceptionReporter] Cannot open connection
      org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=, localId=2117]; - nested
      throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=, localId=211
      7])
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:79)
      at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
      at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:278)
      at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3302)
      at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3282)
      at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:65)
      at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:704)
      at net.sf.hibernate.loader.Loader.doQuery(Loader.java:185)
      at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
      at net.sf.hibernate.loader.Loader.doList(Loader.java:955)
      at net.sf.hibernate.loader.Loader.list(Loader.java:946)
      at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:846)
      at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1543)
      at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1520)
      ...
      at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
      Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=, localId=2117]
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:331)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:462)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:894)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:73)
      ... 22 more
      2007-03-15 23:05:00,587 ERROR [org.quartz.core.JobRunShell] Job DAILY.DPT threw an unhandled Exception:
      ... at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
      Caused by: net.sf.hibernate.JDBCException: Cannot open connection
      at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:281)
      at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3302)
      at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3282)
      at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatemen
      at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:704)
      at net.sf.hibernate.loader.Loader.doQuery(Loader.java:185)
      at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
      at net.sf.hibernate.loader.Loader.doList(Loader.java:955)
      at net.sf.hibernate.loader.Loader.list(Loader.java:946)
      at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:846)
      at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1543)
      at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1520)
      ...... 7 more
      Caused by: org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=, localId=2117
      ]; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=,
      localId=2117])
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:79)
      at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
      at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:278)
      ... 20 more
      Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=, localId=2117]
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:331)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:462)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:894)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:73)
      ... 22 more
      2007-03-15 23:05:00,621 ERROR [org.quartz.core.ErrorLogger] Job (DAILY.DPT threw an exception.
      ...
      te.JDBCException: Cannot open connection]
      at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
      * Nested Exception (Underlying Cause) ---------------
      ... ...
      at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
      Caused by: net.sf.hibernate.JDBCException: Cannot open connection
      at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:281)
      at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3302)
      at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3282)
      at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:65)
      at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:704)
      at net.sf.hibernate.loader.Loader.doQuery(Loader.java:185)
      at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
      at net.sf.hibernate.loader.Loader.doList(Loader.java:955)
      at net.sf.hibernate.loader.Loader.list(Loader.java:946)
      at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:846)
      at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1543)
      at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1520)
      ...... 7 more
      Caused by: org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=, localId=2117
      ]; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=,
      localId=2117])
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:79)
      at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
      at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:278)
      ... 20 more
      Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=, localId=2117]
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:331)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:462)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:894)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:73)
      ... 22 more
      2007-03-15 23:05:00,199 WARN [org.jboss.tm.TransactionImpl] Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=, localId=2117] t
      imed out. status=STATUS_ACTIVE
      ...
      2007-03-15 23:05:00,224 WARN [net.sf.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: null
      2007-03-15 23:05:00,224 ERROR [net.sf.hibernate.util.JDBCExceptionReporter] Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2
      117, BranchQual=, localId=2117]; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=s
      b1-itp-080/2117, BranchQual=, localId=2117])
      2007-03-15 23:05:00,313 ERROR [net.sf.hibernate.util.JDBCExceptionReporter] Cannot open connection
      org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=, localId=2117]; - nested
      throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=, localId=211
      7])
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:79)
      at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
      at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:278)
      at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3302)
      at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3282)
      at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:61)
      at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:525)
      at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:432)
      at net.sf.hibernate.impl.ScheduledIdentityInsertion.execute(ScheduledIdentityInsertion.java:29)
      at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:932)
      at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:857)
      at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:775)
      at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:738)
      ...
      at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
      Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=, localId=2117]
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:331)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:462)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:894)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:73)
      ... 21 more
      ...
      ...
      2007-03-15 23:05:00,484 WARN [net.sf.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: null
      2007-03-15 23:05:00,484 ERROR [net.sf.hibernate.util.JDBCExceptionReporter] Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2
      117, BranchQual=, localId=2117]; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=s
      b1-itp-080/2117, BranchQual=, localId=2117])
      2007-03-15 23:05:00,553 ERROR [net.sf.hibernate.util.JDBCExceptionReporter] Cannot open connection
      org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=, localId=2117]; - nested
      throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=, localId=211
      7])
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:79)
      at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
      at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:278)
      at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3302)
      at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3282)
      at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:65)
      at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:704)
      at net.sf.hibernate.loader.Loader.doQuery(Loader.java:185)
      at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
      at net.sf.hibernate.loader.Loader.doList(Loader.java:955)
      at net.sf.hibernate.loader.Loader.list(Loader.java:946)
      at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:846)
      at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1543)
      at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1520)
      ...
      at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
      Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=, localId=2117]
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:331)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:462)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:894)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:73)
      ... 22 more
      2007-03-15 23:05:00,587 ERROR [org.quartz.core.JobRunShell] Job DAILY.DPT threw an unhandled Exception:
      ... at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
      Caused by: net.sf.hibernate.JDBCException: Cannot open connection
      at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:281)
      at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3302)
      at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3282)
      at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatemen
      at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:704)
      at net.sf.hibernate.loader.Loader.doQuery(Loader.java:185)
      at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
      at net.sf.hibernate.loader.Loader.doList(Loader.java:955)
      at net.sf.hibernate.loader.Loader.list(Loader.java:946)
      at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:846)
      at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1543)
      at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1520)
      ...... 7 more
      Caused by: org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=, localId=2117
      ]; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=,
      localId=2117])
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:79)
      at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
      at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:278)
      ... 20 more
      Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=, localId=2117]
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:331)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:462)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:894)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:73)
      ... 22 more
      2007-03-15 23:05:00,621 ERROR [org.quartz.core.ErrorLogger] Job (DAILY.DPT threw an exception.
      ...
      te.JDBCException: Cannot open connection]
      at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
      * Nested Exception (Underlying Cause) ---------------
      ... ...
      at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
      Caused by: net.sf.hibernate.JDBCException: Cannot open connection
      at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:281)
      at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3302)
      at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3282)
      at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:65)
      at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:704)
      at net.sf.hibernate.loader.Loader.doQuery(Loader.java:185)
      at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
      at net.sf.hibernate.loader.Loader.doList(Loader.java:955)
      at net.sf.hibernate.loader.Loader.list(Loader.java:946)
      at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:846)
      at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1543)
      at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1520)
      ...... 7 more
      Caused by: org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=, localId=2117
      ]; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=,
      localId=2117])
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:79)
      at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
      at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:278)
      ... 20 more
      Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=, localId=2117]
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:331)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:462)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:894)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:73)
      ... 22 more


        • 1. Re: MySQL Connection Problems under heavy load
          Adrian Brock Master

          JBoss JCA won't enlist a transacted connection in a transaction that has
          already timed out.

          Why your transaction is timing out is an issue for you to determine,
          but not really an issue for the JCA forum.

          2007-03-15 23:05:00,199 WARN [org.jboss.tm.TransactionImpl] Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=sb1-itp-080/2117, BranchQual=, localId=2117] t
          imed out. status=STATUS_ACTIVE
          <snipped/>
          nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=s
          b1-itp-080/2117, BranchQual=, localId=2117])
          


          • 2. Re: MySQL Connection Problems under heavy load
            bob - Newbie

            Hey adrian,

            thanks for your answer.

            The cause of the problem was the TransactionTimeout configuration in jboss ( jboss-service.xml -> org.jboss.tm.TransactionManagerService mbean). The default setting is 300 seconds (5 minutes).

            • 3. Re: MySQL Connection Problems under heavy load
              Lu Li Newbie

              Hi Bob,

              I have the exact same error. Could you tell me how I should change the Timeout value? I tried increasing it to 600 or even 900 but the problem still exists.

              Thanks,

              LNgo

              • 4. Re: MySQL Connection Problems under heavy load
                Sunil Newbie

                I have also tried changing the timeout value, but no change in the error.
                ERROR:

                09:59:41,750 ERROR [STDERR] org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImpl:XidImpl[For
                matId=257, GlobalId=dcg00187/580, BranchQual=, localId=580]; - nested throwable: (javax.resource.ResourceException: Tran
                saction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=dcg00187/580, BranchQual=, localId=580])
                09:59:41,750 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.jav


                Thanks

                Sunil

                • 5. Re: MySQL Connection Problems under heavy load
                  Howard Ungar Newbie

                  I'm getting the exact same error on JBoss 4.0.3SP1 with Oracle.

                  2007-05-25 23:32:34,604 WARN [org.jboss.tm.TransactionImpl] Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=manta/567, BranchQual=, localId=567] timed out. status=STATUS_ACTIVE

                  I tried increasing TransactionTimeout in jboss-service.xml to a very large number (648000) and my process still dies after about 1.5 hours. I'm pretty sure my process can finish in under 2 hours but can't get past the 1.5 hour mark. The process is being started from the browser and user session is set to expire after 1 hour inactivity. Could this have anything to do with it?