数据库锁排查

org.quartz.impl.xxxbcjobstore.LockException: Failure obtaining db row lock: Lock wait timeout exceeded; try restarting transaction
at org.quartz.impl.xxxbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:157)
at org.quartz.impl.xxxbcjobstore.DBSemaphore.obtainLock(DBSemaphore.java:113)
at org.quartz.impl.xxxbcjobstore.JobStoreSupport.doCheckin(JobStoreSupport.java:3328)
at org.quartz.impl.xxxbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:3920)
at org.quartz.impl.xxxbcjobstore.JobStoreSupport$ClusterManager.initialize(JobStoreSupport.java:3905)
at org.quartz.impl.xxxbcjobstore.JobStoreSupport.schedulerStarted(JobStoreSupport.java:692)
at org.quartz.core.QuartzScheduler.start(QuartzScheduler.java:539)
at org.quartz.impl.StdScheduler.start(StdScheduler.java:142)
at org.springframework.scheduling.quartz.SchedulerFactoryBean$1.run(SchedulerFactoryBean.java:750)
Caused by: com.mysql.cj.xxxbc.exceptions.MySQLTransactionRollbackException: Lock wait timeout exceeded; try restarting transaction
at com.mysql.cj.xxxbc.exceptions.SQLError.createSQLException(SQLError.java:123)
at com.mysql.cj.xxxbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at com.mysql.cj.xxxbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.xxxbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:974)
at com.mysql.cj.xxxbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1024)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:353)
at org.quartz.impl.xxxbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:96)
... 8 common frames omitted

 

 

 

相关SQL:

show PROCESSLIST



#当前运行的所有事务
SELECT * FROM information_schema.INNODB_TRX;


kill 1539004
kill 1538989


#当前出现的锁
SELECT * FROM information_schema.INNODB_LOCKs;

#锁等待的对应关系
SELECT * FROM information_schema.INNODB_LOCK_waits;


 

posted @ 2019-03-01 10:55  bf378  阅读(1029)  评论(0编辑  收藏  举报