seata AT模式数据库死锁应该怎么解决?

1、版本 1.4.2
2、配置
image.png

3、错误详情
io.seata.common.exception.StoreException: Deadlock found when trying to get lock; try restarting transaction
at io.seata.server.storage.db.lock.LockStoreDataBaseDAO.unLock(LockStoreDataBaseDAO.java:269) ~[classes/:na]
at io.seata.server.storage.db.lock.DataBaseLocker.releaseLock(DataBaseLocker.java:103) ~[classes/:na]
at io.seata.server.storage.db.lock.DataBaseLockManager.releaseGlobalSessionLock(DataBaseLockManager.java:79) ~[classes/:na]
at io.seata.server.session.GlobalSession.clean(GlobalSession.java:230) [classes/:na]
at io.seata.server.session.GlobalSession.closeAndClean(GlobalSession.java:243) [classes/:na]
at io.seata.server.coordinator.DefaultCore.lambda$commit$0(DefaultCore.java:154) [classes/:na]
at io.seata.server.storage.db.session.DataBaseSessionManager.lockAndExecute(DataBaseSessionManager.java:194) ~[classes/:na]
at io.seata.server.session.SessionHolder.lockAndExecute(SessionHolder.java:331) ~[classes/:na]
at io.seata.server.coordinator.DefaultCore.commit(DefaultCore.java:152) [classes/:na]
at io.seata.server.coordinator.DefaultCoordinator.doGlobalCommit(DefaultCoordinator.java:170) ~[classes/:na]
at io.seata.server.AbstractTCInboundHandler$2.execute(AbstractTCInboundHandler.java:95) ~[classes/:na]
at io.seata.server.AbstractTCInboundHandler$2.execute(AbstractTCInboundHandler.java:90) ~[classes/:na]
at io.seata.core.exception.AbstractExceptionHandler.exceptionHandleTemplate(AbstractExceptionHandler.java:124) ~[seata-core-1.4.2.jar:na]
at io.seata.server.AbstractTCInboundHandler.handle(AbstractTCInboundHandler.java:90) ~[classes/:na]
at io.seata.core.protocol.transaction.GlobalCommitRequest.handle(GlobalCommitRequest.java:34) ~[seata-core-1.4.2.jar:na]
at io.seata.server.coordinator.DefaultCoordinator.onRequest(DefaultCoordinator.java:473) ~[classes/:na]
at io.seata.core.rpc.processor.server.ServerOnRequestProcessor.onRequestMessage(ServerOnRequestProcessor.java:116) ~[seata-core-1.4.2.jar:na]
at io.seata.core.rpc.processor.server.ServerOnRequestProcessor.process(ServerOnRequestProcessor.java:77) ~[seata-core-1.4.2.jar:na]
at io.seata.core.rpc.netty.AbstractNettyRemoting.lambda$processMessage$2(AbstractNettyRemoting.java:279) ~[seata-core-1.4.2.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_212]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_212]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-all-4.1.30.Final.jar:4.1.30.Final]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_212]
Caused by: com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:123) ~[na:na]
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) ~[na:na]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[na:na]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953) ~[na:na]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1092) ~[na:na]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1040) ~[na:na]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1347) ~[na:na]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:1025) ~[na:na]
at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeUpdate(DruidPooledPreparedStatement.java:255) ~[druid-1.1.23.jar:1.1.23]
at io.seata.server.storage.db.lock.LockStoreDataBaseDAO.unLock(LockStoreDataBaseDAO.java:267) ~[classes/:na]
... 22 common frames omitted

展开
收起
经叫唤 2024-02-28 10:35:59 247 发布于重庆 分享
分享
版权
举报
阿里云 AI 助理回答

对不起,我已经学习的云计算知识中不包含问题相关内容,暂时无法提供答案。您有阿里云产品相关问题,我会帮助您解答。

有帮助
无帮助
AI 助理回答生成答案可能存在不准确,仅供参考
0 条回答
写回答
取消 提交回答

为企业提供高效、稳定、易扩展的中间件产品。

还有其他疑问?
咨询AI助理