xuxueli / xxl-job

A distributed task scheduling framework.(分布式任务调度平台XXL-JOB)
http://www.xuxueli.com/xxl-job/
GNU General Public License v3.0
27.6k stars 10.92k forks source link

XXLJOB 2.2.0 xxl_job_registry deadlock问题,出现频繁--3个节点 #2282

Open asdfghhong opened 3 years ago

asdfghhong commented 3 years ago

版本:2.2.0 环境: docker环境 次数: 频繁出现

Error updating database. Cause: com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction

The error may exist in class path resource [mybatis-mapper/XxlJobRegistryMapper.xml]

The error may involve defaultParameterMap

The error occurred while setting parameters

SQL: UPDATE xxl_job_registry SET update_time = ? WHERE registry_group = ? AND registry_key = ? AND registry_value = ?

Cause: com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction

; Deadlock found when trying to get lock; try restarting transaction; nested exception is com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:267) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:88) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440) at com.sun.proxy.$Proxy77.update(Unknown Source)

Mihawk-lf commented 3 years ago

部署过程中出现的?还是运行一段时间出现的,怎么会出现死锁那。 异常时刻,是否有其他事务对改表操作那。

9monsters commented 1 year ago

并发下在检查 执行器是否超时 和 注册更新执行器时就会出现死锁