Lock wait timeout exceeded; try restarting transaction
What gives this away is the word transaction. It is evident by the statement that the query was attempting to change at least one row in one or more InnoDB tables. Since you know the query, all the tables being accessed are candidates for being the culprit. From there, you should be able to run SHOW ENGINE INNODB STATUS\G You should be able to see the affected table(s) You get all kinds of additional Locking and Mutex Information. Here is a sample from one of my clients:' You should consider increasing the lock wait timeout value for InnoDB by setting the innodb_lock_wait_timeout, default is 50 sec mysql> show variables like 'innodb_lock_wait_timeout';
+--------------------------+-------+
| Variable_name | Value |
+--------------------------+-------+
| innodb_lock_wait_timeout | 50 |
+--------------------------+-------+
1 row in set (0.01 sec)
You can set it to higher value in /etc/my.cnf permanently with this line [mysqld]
innodb_lock_wait_timeout=120
and restart mysql. If you cannot restart mysql at this time, run this: SET GLOBAL innodb_lock_wait_timeout = 120;
You could also just set it for the duration of your session SET innodb_lock_wait_timeout = 120;
followed by your query Give it a Try !!!
Lock wait timeout exceeded; try restarting transaction的更多相关文章
- Caused by: java.sql.BatchUpdateException: Transaction error, need to rollback. errno:1205 Lock wait timeout exceeded; try restarting transaction
更新的时候报 Caused by: java.sql.BatchUpdateException: Transaction error, need to rollback. errno:1205 Loc ...
- mysql死锁,等待资源,事务锁,Lock wait timeout exceeded; try restarting transaction解决
前面已经了解了InnoDB关于在出现锁等待的时候,会根据参数innodb_lock_wait_timeout的配置,判断是否需要进行timeout的操作,本文档介绍在出现锁等待时候的查看及分析处理: ...
- ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction
测试库一条update语句报错:ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction mysql> ...
- pymysql.err.InternalError: (1205, 'Lock wait timeout exceeded; try restarting transaction')错误处理
问题描述: 在使用pymysql库时,利用游标执行插入操作,产生错误,会出现pymysql.err.InternalError: (1205, 'Lock wait timeout exceeded; ...
- ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction解决办法
一.问题描述: 同事反馈线上一个表有其中一条数据无法删除,其他都正常,我拿到删数据的sql,尝试执行,报错如下: mysql> delete from facebook_posts where ...
- 排查mysql innodb Lock wait timeout exceeded; try restarting transaction的问题
OMG写的时候崩溃了一次. 触发关注这个问题的事情是 我们在使用pt-online-schedule 改表的时候总是拿不到锁,并且报出mysql innodb Lock wait timeout ex ...
- 【问题解决:死锁】Lock wait timeout exceeded; try restarting transaction的问题
执行数据删除操作时一直超时并弹出Lock wait timeout exceeded; try restarting transaction错误 解决办法 1.先查看数据库的事务隔离级别 select ...
- com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Lock wait timeout exceeded; try restarting transaction
本文为博主原创: 以下为在程序运行过程中报的错误, org.springframework.dao.CannotAcquireLockException: ### Error updating dat ...
- mysql Lock wait timeout exceeded; try restarting transaction解决
前面已经了解了InnoDB关于在出现锁等待的时候,会根据参数innodb_lock_wait_timeout的配置,判断是否需要进行timeout的操作,本文档介绍在出现锁等待时候的查看及分析处理: ...
- Mysql Lock wait timeout exceeded; try restarting transaction的问题
今天在后台跑任务的时候,发现了数据库报错1205 - Lock wait timeout exceeded; try restarting transaction.问题原因是因为表的事务锁,以下是解决 ...
随机推荐
- libevent 定时器示例
程序执行结果: 每隔2秒,触发一次定时器. (2)98行:evtimer_assign在event.h中定义如下: 再来看看event_assign函数: ev 要初始化的事件对象 base ...
- UIImagePickerController之Block回调
方法使用:引入头文件 #import "UIImagePickerController+Block.h" 我这拖出来的两个属性 @property (weak, nonatomic ...
- 关于Swift中实现Lazy initialize的方式
在oc中我们通过 -(CardMatchingGame *)game { if(!_game) _game=[[CardMatchingGame alloc] initWithCardCount:[s ...
- 单点登录 关于Cookie跨域的问题
public void ProcessRequest(HttpContext context) { HttpCookie cookie = new HttpCookie("name" ...
- Android实现AppWidget、Broadcast静态注册
Android实现AppWidget.Broadcast静态注册 本篇博客是基于我上一篇博客继续修改的,详情请看Android实现AppWidget.Broadcast动态注册 开发工具:Andori ...
- pb对Web Service的操作可使用两种方式实现
从PB8.0/9.0开始,就已经提供Web Service Proxy功能,能够直接进行相关程序的编写. 但是,部分老项目使用PB6.5开发 研究后发现,其实PB6.5要操作Web Service也挺 ...
- USB硬件远程共享解决iphone已停用
悲剧的在iphone拆过电池之后,再开机显示iphone已停用,请在23000000分钟后再试一次 算算这得45年了,可以留给孙子用了... 网上除了刷机和有同步过的电脑貌似没有别的办法了 因是旧系统 ...
- Python 获取学校图书馆OAPC账号对应的身份证号码
import urllib.request import urllib.parse import http.cookiejar import re lib_login = 'http://xxx.ed ...
- Alt.js的入门
一.什么是Alt altJS是基于Flux使用Javascript应用来管理数据的类库,它简化了flux的store.actions.dispatcher. 关于Flux,以下链接都做了很好的诠释 h ...
- 自定义异常时如何定义checked异常和unchecked异常
When defining your own exception type, study the existing exception classes in the Java API and try ...