java.sql.SQLException

Lock wait timeout exceeded; try restarting transaction

Samebug tips1

MySQL doesn't support some types of characters (such as emojis) with the utf8 encoding. You need to be on MySQL 5.5+ and force utf8mb4 (everywhere, client and server). You can do this sending the query "SET NAMES utf8mb4". Check this https://goo.gl/3E2qzg

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web1582

  • Lock wait timeout exceeded; try restarting transaction
  • via Coderanch by stanislav bashkirtsev, 7 months ago
    Lock wait timeout exceeded; try restarting transaction
  • via GitHub by latusaki
    , 1 year ago
    Lock wait timeout exceeded; try restarting transaction
  • Stack trace

    • java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3536) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3468) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1957) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2107) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2648) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2086) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2371) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2289) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2274) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102) at org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.db.SingleDbJDBCConnection.addNodeRecord(SingleDbJDBCConnection.java:280) at org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.db.MySQLSingleDbJDBCConnection.addNodeRecord(MySQLSingleDbJDBCConnection.java:91) at org.exoplatform.services.jcr.impl.storage.jdbc.JDBCStorageConnection.add(JDBCStorageConnection.java:366) at org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager.doAdd(WorkspacePersistentDataManager.java:655) at org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager$ChangesLogPersister.save(WorkspacePersistentDataManager.java:386) at org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager.save(WorkspacePersistentDataManager.java:164) at org.exoplatform.services.jcr.impl.dataflow.persistent.CacheableWorkspaceDataManager.access$101(CacheableWorkspaceDataManager.java:51) at org.exoplatform.services.jcr.impl.dataflow.persistent.CacheableWorkspaceDataManager$SaveInTransaction.action(CacheableWorkspaceDataManager.java:254) at org.exoplatform.services.jcr.impl.dataflow.persistent.TxIsolatedOperation.txAction(TxIsolatedOperation.java:92) at org.exoplatform.services.jcr.impl.dataflow.persistent.CacheableWorkspaceDataManager$SaveInTransaction.txAction(CacheableWorkspaceDataManager.java:260) at org.exoplatform.services.jcr.impl.dataflow.persistent.TxIsolatedOperation.perform(TxIsolatedOperation.java:210) at org.exoplatform.services.jcr.impl.dataflow.persistent.CacheableWorkspaceDataManager.save(CacheableWorkspaceDataManager.java:485) at org.exoplatform.services.jcr.impl.dataflow.persistent.ACLInheritanceSupportedWorkspaceDataManager.save(ACLInheritanceSupportedWorkspaceDataManager.java:216) at org.exoplatform.services.jcr.impl.dataflow.persistent.VersionableWorkspaceDataManager.save(VersionableWorkspaceDataManager.java:235) at org.exoplatform.services.jcr.impl.dataflow.session.TransactionableDataManager.save(TransactionableDataManager.java:357) at org.exoplatform.services.jcr.impl.core.SessionDataManager.commit(SessionDataManager.java:1294) at org.exoplatform.services.jcr.impl.core.ItemImpl.save(ItemImpl.java:676) at org.exoplatform.services.jcr.impl.core.SessionImpl.save(SessionImpl.java:934) at org.exoplatform.jcr.benchmark.usecases.AddNtFileWithMetadataTestCleanDBOracle.doRun(AddNtFileWithMetadataTestCleanDBOracle.java:95) at org.exoplatform.jcr.benchmark.JCRDriver.run(JCRDriver.java:116) at com.sun.japex.JapexDriverBase.run(JapexDriverBase.java:256) at com.sun.japex.JapexDriverBase.call(JapexDriverBase.java:315) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 1 year ago
    Unknown user
    2 times, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    4 times, 9 months ago
    153 more bugmates