首页 > 数据库技术 > 详细

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

时间:2020-11-11 09:44:01      阅读:38      评论:0      收藏:0      [点我收藏+]
版本: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

原文:https://blog.51cto.com/6464430/2548811

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!