Uploaded image for project: 'MidPoint'
  1. MidPoint
  2. MID-4881

Lock wait timeout exceeded; try restarting transaction

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 3.6.1
    • Fix Version/s: 4.0
    • Component/s: Repository
    • Labels:
      None
    • Environment:

      production, org.mariadb.jdbc.Driver v1.5 with 3 month audit logging and no global reconcile or other heavy task in background

    • Subscription:
      Active subscription
    • Git Revision:
      git-v3.6.1-22-g39b305b0fb
    • Milestone:
      RELEASE

      Description

      end user catch red error when try to change password, same error is showd in near same time over superuser, but after 30 min same operation is successed, in log we see:

      2018-09-10 12:52:09,701 [] [Thread-81133] ERROR (com.evolveum.midpoint.web.component.progress.ProgressReporter): Error executing changes.
      com.evolveum.midpoint.util.exception.SystemException: could not execute batch
      at com.evolveum.midpoint.repo.sql.helpers.BaseHelper.handleGeneralRuntimeException(BaseHelper.java:178) ~[repo-sql-impl-3.6.2-SNAPSHOT.jar:na]
      at com.evolveum.midpoint.repo.sql.SqlAuditServiceImpl.auditAttempt(SqlAuditServiceImpl.java:354) ~[repo-sql-impl-3.6.2-SNAPSHOT.jar:na]
      at com.evolveum.midpoint.repo.sql.SqlAuditServiceImpl.audit(SqlAuditServiceImpl.java:97) ~[repo-sql-impl-3.6.2-SNAPSHOT.jar:na]
      at com.evolveum.midpoint.init.AuditServiceProxy.audit(AuditServiceProxy.java:101) ~[system-init-3.6.2-SNAPSHOT.jar:na]
      at com.evolveum.midpoint.model.impl.lens.Clockwork.auditEvent(Clockwork.java:1124) ~[model-impl-3.6.2-SNAPSHOT.jar:na]
      at com.evolveum.midpoint.model.impl.lens.Clockwork.audit(Clockwork.java:1020) ~[model-impl-3.6.2-SNAPSHOT.jar:na]
      at com.evolveum.midpoint.model.impl.lens.Clockwork.click(Clockwork.java:423) ~[model-impl-3.6.2-SNAPSHOT.jar:na]
      at com.evolveum.midpoint.model.impl.lens.Clockwork.run(Clockwork.java:197) ~[model-impl-3.6.2-SNAPSHOT.jar:na]
      at com.evolveum.midpoint.model.impl.controller.ModelController.executeChanges(ModelController.java:572) ~[model-impl-3.6.2-SNAPSHOT.jar:na]
      at sun.reflect.GeneratedMethodAccessor1691.invoke(Unknown Source) ~[na:na]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171]
      at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171]
      at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:507) ~[wicket-ioc-7.6.0.jar:7.6.0]
      at com.sun.proxy.$Proxy164.executeChanges(Unknown Source) ~[na:na]
      at com.evolveum.midpoint.web.component.progress.ProgressReporter.lambda$executeChangesAsync$0(ProgressReporter.java:187) ~[classes/:na]
      at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_171]
      Caused by: org.hibernate.exception.GenericJDBCException: could not execute batch
      at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
      at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
      at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:136) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final]

      Caused by: java.sql.BatchUpdateException: (conn:182) Lock wait timeout exceeded; try restarting transaction
      Query is: insert into m_audit_item (changedItemPath, record_id) values (?, ?), parameters '\${common}3#credentials\${0}#password\${0}#value',442399,'\${common}3#credentials',442399,['\$

      {common}3#credentials\${0}#password',442399]
      at org.mariadb.jdbc.MariaDbServerPreparedStatement.executeBatch(MariaDbServerPreparedStatement.java:281) ~[mariadb-java-client-1.5.5.jar:na]
      at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1135) ~[c3p0-0.9.2.1.jar:0.9.2.1]
      at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:127) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
      ... 29 common frames omitted
      Caused by: java.sql.SQLException: (conn:182) Lock wait timeout exceeded; try restarting transaction
      Query is: insert into m_audit_item (changedItemPath, record_id) values (?, ?), parameters '\${common}3#credentials\${0}#password\${0}#value',442399,'\${common}3#credentials',442399,['\${common}

      3#credentials\${0}#password',442399]
      at org.mariadb.jdbc.internal.util.ExceptionMapper.get(ExceptionMapper.java:145) ~[mariadb-java-client-1.5.5.jar:na]
      at org.mariadb.jdbc.internal.util.ExceptionMapper.getException(ExceptionMapper.java:101) ~[mariadb-java-client-1.5.5.jar:na]
      at org.mariadb.jdbc.internal.util.ExceptionMapper.throwAndLogException(ExceptionMapper.java:77) ~[mariadb-java-client-1.5.5.jar:na]
      at org.mariadb.jdbc.MariaDbStatement.executeQueryEpilog(MariaDbStatement.java:224) ~[mariadb-java-client-1.5.5.jar:na]
      at org.mariadb.jdbc.MariaDbServerPreparedStatement.executeBatch(MariaDbServerPreparedStatement.java:272) ~[mariadb-java-client-1.5.5.jar:na]
      ... 31 common frames omitted
      Caused by: org.mariadb.jdbc.internal.util.dao.QueryException: Lock wait timeout exceeded; try restarting transaction
      Query is: insert into m_audit_item (changedItemPath, record_id) values (?, ?), parameters '\${common}3#credentials\${0}#password\${0}#value',442399,'\${common}3#credentials',442399,['\$

      {common}

      3#credentials\${0}#password',442399]
      at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult(AbstractQueryProtocol.java:1114) ~[mariadb-java-client-1.5.5.jar:na]
      at org.mariadb.jdbc.internal.protocol.AsyncMultiRead.call(AsyncMultiRead.java:84) ~[mariadb-java-client-1.5.5.jar:na]
      at org.mariadb.jdbc.internal.protocol.AsyncMultiRead.call(AsyncMultiRead.java:12) ~[mariadb-java-client-1.5.5.jar:na]
      at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_171]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_171]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_171]
      ... 1 common frames omitted
      2

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                oscar Gustáv Pálos
                Reporter:
                oscar Gustáv Pálos
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: