获取锁等待超时超过;尝试重新启动事务 [英] Getting Lock wait timeout exceed; try restarting transaction

查看:435
本文介绍了获取锁等待超时超过;尝试重新启动事务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨frens,





我得到:锁定等待超时超过;尝试重新启动与mysql相关的事务....

实际上我使用的是windows服务,它将访问数据库以同步数据.....它将在后台发生....而且正常的应用程序是也指数据库......有时候交易会很大......我猜这两个在某些时候发生冲突,那就是发生锁定的时候?我不确定 !请指导如何解决问题...任何帮助将不胜感激





谢谢

Darshan

解决方案





当事务正在等待已经锁定的资源时,通常会发生此错误通过其他一些交易。



首先,发生此错误后,您应该运行 SHOW ENGINE INNODB STATUS 以获取更多信息。链接: SHOW ENGINE INNODB状态 [ ^ ]



让我知道结果。



此外,您应该考虑增加默认(50秒)锁定等待超时值。链接: innodb_lock_wait_timeout [ ^ ]

Hi frens,


I am getting: Lock wait timeout exceed; try restarting transaction related to mysql ....
Actually im using windows service which will access database to sync data.....it ll happen in background ....and also the normal application is also referring to the database ...sometimes the transaction will be huge .... i guess these two are colliding at some point and thats when lock is happening ? i am not sure ! please guide how to solve the issue ...any help will be appreciated


Thanks
Darshan

解决方案

Hi,

This error usually occurs when a transaction is waiting for a resource which is already locked by some other transaction.

First of all, after this error occurs, you should run SHOW ENGINE INNODB STATUS in order to get more information. Link: SHOW ENGINE INNODB STATUS[^]

Let me know the results.

Also, you should consider increasing the default (50 seconds) lock wait timeout value. Link: innodb_lock_wait_timeout[^]


这篇关于获取锁等待超时超过;尝试重新启动事务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆