The client was disconnected by the server because of inactivity. See wait_timeout and interactive_timeout for configuring this behavior.
# 当前运行的所有事务 select * from information_schema.innodb_trx; # 查看锁的持有和请求情况 MySQL8.0 select * from performance_schema.data_locks; # 查看锁的等待情况 MySQL8.0 select * from performance_schema.data_lock_waits; # 当前线程详情 show full processlist;
复制
KILL 362
复制
trx_mysql_thread_id = 0 无法Kill 接着排查
确认 trx_mysql_thread_id = 0 为XA(分布式)事务
#查看XA事务信息 xa recover; #执行报错可能没有权限 GRANT XA_RECOVER_ADMIN ON *.* TO root@'%' ;
复制
得到
回滚XA事务操作
# XA事务回滚命令的格式: xa rollback 'left(data,gtrid_length)','substr(data,gtrid_length+1,bqual_length)', formatID; #示列 SELECT left('55f3cdd8-4f45-49c8-bbca-2738fa5a1514:35',38); SELECT substr('55f3cdd8-4f45-49c8-bbca-2738fa5a1514:35',39,1); xa rollback '55f3cdd8-4f45-49c8-bbca-2738fa5a1514:3', '5',1;
复制