关于 MYSQL错误: ERROR 1205: Lock wait timeout exceeded

版本:5.7
问题现象:执行任何语句都报ERROR 1205: Lock wait timeout exceeded; try restarting transaction
排查:

select from innodb_trx 查询看到有commit语句,但是没有具体的SQL语句
select
from information_schema.innodb_lock_waits
select from information_schema.innodb_locks;
以上2句 没有查到锁表信息
/
innodb 行锁等待脚本*/
SELECT r.trx_mysql_thread_id waiting_thread,r.trx_query waiting_query,
CONCAT(TIMESTAMPDIFF(SECOND,r.trx_wait_started,CURRENT_TIMESTAMP()),‘s‘) AS duration,
b.trx_mysql_thread_id blocking_thread,t.processlist_command state,b.trx_query blocking_current_query,e.sql_text blocking_last_query
FROM information_schema.innodb_lock_waits w
JOIN information_schema.innodb_trx b ON b.trx_id = w.blocking_trx_id
JOIN information_schema.innodb_trx r ON r.trx_id = w.requesting_trx_id
JOIN performance_schema.threads t ON t.processlist_id = b.trx_mysql_thread_id
JOIN performance_schema.events_statements_current e USING(thread_id)
也没有查到,以上简单的查询都没有找到可以的表锁,但是执行就报锁超时,检查数据库的后台日志发现磁盘空间不足,处理后问他修复~,果然坑
[ERROR] InnoDB: Write to file /opt/mysql/mysql_data/xb_doublewritefailed at offset 14680064, 1048576 bytes should have been written, only 0 were written. Operating system error number 28. Che
ck that your OS and file system support files of this size. Check also that the disk is not full or a disk quota exceeded.

关于 MYSQL错误: ERROR 1205: Lock wait timeout exceeded

上一篇:MySQL数据库介绍与安装部署


下一篇:数据库|视图