mysql error1205 博客_关于 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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值