Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-781

RS DB deadlock on "setLastUsageForNow"

    XMLWordPrintable

    Details

      Description

      This method don't need to be called every micron seconds, one time / minute is enough

      RedScreen on (tomcat9) 8.4.3
      2013-09-03 07:46:13,181 [ajp-8029-9] ERROR DBRuntimeException - OLAT::ERROR % N9-E2 % org.olat.core.logging
      Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) % *RedScreen* commit failed, rollback transaction ::_::
      <dispatchinfo>
      <componentinfo>
      <compname>luTreeRun</compname>
      <compclass>org.olat.core.gui.components.tree.MenuTree</compclass>
      <extendedinfo>n/a</extendedinfo>
      <event>
      <class>org.olat.core.gui.components.tree.TreeEvent</class>
      <command>ctncl</command>
      <tostring>TreeEvent:

      {cmd:ctncl, nodeid:88197689247843}

      </tostring>
      </event>
      </componentinfo>
      <controllerinfo>
      <controllername>org.olat.course.run.RunMainController</controllername>
      <controllername>org.olat.core.commons.fullWebApp.BaseFullWebappController</controllername>
      <controllername>org.olat.core.commons.chiefcontrollers.controller.simple.SimpleBaseController</controllername>
      <controllername>org.olat.core.commons.chiefcontrollers.BaseChiefController</controllername>
      </controllerinfo>
      </dispatchinfo>
      >>> stack of 1.cause::org.olat.core.logging.DBRuntimeException: commit failed, rollback transaction
      -> at org.olat.core.commons.persistence.DBImpl.commit(DBImpl.java:814)
      at org.olat.repository.RepositoryManager.setLastUsageNowFor(RepositoryManager.java:794)
      at org.olat.course.run.navigation.NodeClickedRef.getRunController(NodeClickedRef.java:150)
      at org.olat.course.run.navigation.NavigationHandler.doEvaluateJumpTo(NavigationHandler.java:363)
      at org.olat.course.run.navigation.NavigationHandler.evaluateJumpToTreeNode(NavigationHandler.java:219)
      at org.olat.course.run.RunMainController.event(RunMainController.java:481)
      at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:195)
      at org.olat.core.gui.components.Component$1.run(Component.java:238)
      at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)
      at org.olat.core.gui.components.Component.fireEvent(Component.java:235)
      at org.olat.core.gui.components.tree.MenuTree.handleClick(MenuTree.java:253)
      >>> stack of 2.cause::javax.persistence.RollbackException: Error while committing the transaction
      -> at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:92)
      at org.olat.core.commons.persistence.DBImpl.commit(DBImpl.java:781)
      at org.olat.repository.RepositoryManager.setLastUsageNowFor(RepositoryManager.java:794)
      at org.olat.course.run.navigation.NodeClickedRef.getRunController(NodeClickedRef.java:150)
      at org.olat.course.run.navigation.NavigationHandler.doEvaluateJumpTo(NavigationHandler.java:363)
      at org.olat.course.run.navigation.NavigationHandler.evaluateJumpToTreeNode(NavigationHandler.java:219)
      at org.olat.course.run.RunMainController.event(RunMainController.java:481)
      at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:195)
      at org.olat.core.gui.components.Component$1.run(Component.java:238)
      at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)
      at org.olat.core.gui.components.Component.fireEvent(Component.java:235)
      >>> stack of 3.cause::javax.persistence.PersistenceException: org.hibernate.exception.LockAcquisitionException: Deadlock found when trying to get lock; try restarting transaction
      -> at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387)
      at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1310)
      at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:80)
      at org.olat.core.commons.persistence.DBImpl.commit(DBImpl.java:781)
      at org.olat.repository.RepositoryManager.setLastUsageNowFor(RepositoryManager.java:794)
      at org.olat.course.run.navigation.NodeClickedRef.getRunController(NodeClickedRef.java:150)
      at org.olat.course.run.navigation.NavigationHandler.doEvaluateJumpTo(NavigationHandler.java:363)
      at org.olat.course.run.navigation.NavigationHandler.evaluateJumpToTreeNode(NavigationHandler.java:219)
      at org.olat.course.run.RunMainController.event(RunMainController.java:481)
      at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:195)
      at org.olat.core.gui.components.Component$1.run(Component.java:238)
      >>> stack of 4.cause::org.hibernate.exception.LockAcquisitionException: Deadlock found when trying to get lock; try restarting transaction
      -> at org.hibernate.dialect.MySQLDialect$1.convert(MySQLDialect.java:392)
      at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
      at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
      at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
      at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:129)
      at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81)
      at $Proxy29.executeUpdate(Unknown Source)
      at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:56)
      at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3185)
      at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:3087)
      at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3416)
      >>> stack of 5.cause::com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
      -> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
      at com.mysql.jdbc.Util.getInstance(Util.java:386)
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1065)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664)

        Attachments

          Activity

            People

            • Assignee:
              srosse Stéphane Rossé
              Reporter:
              srosse Stéphane Rossé
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: