mysql 异常 Lock wait timeout exceeded; try restarting transaction;expc=java.sql.SQLExcept
这种一般是等锁超时了,可以设置延长等锁时间。
mysql> set innodb_lock_wait_timeout=100
Query OK, 0 rows affected (0.02 sec)
查询当前等锁时间
mysql> show variables like 'innodb_lock_wait_timeout';
+--------------------------+-------+
| Variable_name | Value |
+--------------------------+-------+
| innodb_lock_wait_timeout | 100 |
+--------------------------+-------+
但我们更倾向于找出耗时长的sql,看是哪里hold住了。
SHOW ENGINE INNODB STATUS\G
You can see list of locked tables by-
show open tables where in_use>0; 查看当前在用的线程。
show full processlist;
如果是之前的线程,可以查看慢日志。先到 Mysql的配置文件查看slow log的日志目录,再到该目录查看日志。
mysql 异常 Lock wait timeout exceeded; try restarting transaction;expc=java.sql.SQLExcept的更多相关文章
- mysql异常Lock wait timeout exceeded; try restarting transaction
mysql中使用update语句更新数据报错: Lock wait timeout exceeded; try restarting transaction. 这是由于你要更新的表的锁在其它线程手里. ...
- 排查mysql innodb Lock wait timeout exceeded; try restarting transaction的问题
OMG写的时候崩溃了一次. 触发关注这个问题的事情是 我们在使用pt-online-schedule 改表的时候总是拿不到锁,并且报出mysql innodb Lock wait timeout ex ...
- 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
工作中处理定时任务分发消息时出现的问题,在查找并解决问题的时候,将相关的问题博客收集整理,在此记录下,以便之后再遇到相同的问题,方便查阅. 问题场景 问题出现的场景: 在消息队列处理消息时,同一事务内 ...
- Mysql事物锁等待超时(Lock wait timeout exceeded; try restarting transaction)
一.问题描述 在做查询语句时,MySQL 抛出了这样的异常:锁等待超时 Lock wait timeout exceeded; try restarting transaction,是当前事务在等待其 ...
- mysql死锁,等待资源,事务锁,Lock wait timeout exceeded; try restarting transaction解决
前面已经了解了InnoDB关于在出现锁等待的时候,会根据参数innodb_lock_wait_timeout的配置,判断是否需要进行timeout的操作,本文档介绍在出现锁等待时候的查看及分析处理: ...
- mysql Lock wait timeout exceeded; try restarting transaction解决
前面已经了解了InnoDB关于在出现锁等待的时候,会根据参数innodb_lock_wait_timeout的配置,判断是否需要进行timeout的操作,本文档介绍在出现锁等待时候的查看及分析处理: ...
- Mysql错误:ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction
昨晚添加完索引之后, 查询整表的时候抛出Lock wait timeout exceeded; try restarting transaction, 吓死小白的我, 为什么条件查询可以, 整表查不了 ...
- MySQL应用报错:java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
开发反馈,某业务系统插入一条记录的时候,日志报错,插入失败: ### Error updating database. Cause: java.sql.SQLException: Lock wait ...
随机推荐
- 批处理学习笔记1 - Hellow World
记录自己学习批处理的一点总结吧. 批处理的好处: 可以配合vs,在build完文件之后执行自己的批处理命令. 可以批量修改文件名,或者进行复杂的查询等,对文件可编程操作. 从Hellow world开 ...
- Linux C语言小程序
Linux C语言小程序 #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include & ...
- 关于DDR3非常棒的文章
xilinx平台DDR3设计教程之仿真篇 http://wenku.baidu.com/view/c452d9a5524de518964b7dca.html?pn=50
- 原来的debussy可以在win7的64位系统下运行吗
可以的,首先下载两个DLL:msvcr71.dll和msvcp71.dll,然后破解一下就可以了. https://zhidao.baidu.com/question/2419893614880017 ...
- 每日英语:Is It Possible To Reason About Having A Child?
How can you decide whether to have a child? It's a complex and profound question -- a philosophical ...
- egret学习记录
最近h5小游戏比较流行,本来我是做cocos2dx的,一开始想用它的js版. 可惜看着js真是头大.于是选择了egret,egret采用typescript,学过面向对象的,上手还是比较快的,而且ap ...
- uboot在nandflash存储时内存和NandFlash存储空间
硬件采用nandflash,nandflash为8位数据宽度,没有dataflash和norflash. Nandflash空间分配为 bootstrap + u-boot + env + linux ...
- yaffs2文件镜像制作工具yaffs2image
1. 不同nand容量,工具不一样. 首先使用的是mkyaffs2image,编译生成根文件系统的镜像之后,下载到板子上,启动的时候报错,错误代码这里没有上传.问题出在工具使用的不正确,查看工具目录 ...
- iOS边练边学--UITableView性能优化之三种方式循环利用
一.cell的循环利用方式1: /** * 什么时候调用:每当有一个cell进入视野范围内就会调用 */ - (UITableViewCell *)tableView:(UITableView *)t ...
- ubuntu下配置java环境
配置JDK环境 下载 登录oracle的网站去下载JDK7 http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads ...