java.sql.SQLException: Lock wait timeout exceeded;
来源:互联网 发布:少数民族人脸数据库 编辑:程序博客网 时间:2024/05/19 11:50
java.sql.SQLException: org.springframework.dao.CannotAcquireLockException: PreparedStatementCallback; SQL [update social_hunan_seed_info set batchId=?, status='1',last_update_date = now() where status='0' limit ?]; Lock wait timeout exceeded; try restarting transaction; nested exception is java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
从错误上来看是锁的原因,等待锁超时
SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS;#查询当前进行锁等待的
可以看到有两条记录,拿着这个id,
select * from information_schema.innodb_trx;#查询所有被锁的
这是所有的,加上上面的id可查询到一条数据,说明被锁住了
锁住时执行的操作,里面可以看到锁住哪张表了。
暂时还不会通过kill id进程。。。。
show variables like '%table_lock%';#查询系统的锁等待时间
将 '19-5月 -15 00.00.00.000000000 上午' 转换成标准时间格式:
select to_char(cast (cast (createdate as timestamp) as date),'yyyy-mm-dd hh24:mi:ss') from jd_userinfo t where t.createdate like '%月%';
select to_date(to_char(cast (cast (createdate as timestamp) as date),'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss') from jd_userinfo t where t.createdate like '%月%';
cast (createdate as timestamp) 时间戳
cast (cast (createdate as timestamp) as date) 转换成date
to_char(cast (cast (createdate as timestamp) as date),'yyyy-mm-dd hh24:mi:ss') 转换成字符串
to_date(to_char(cast (cast (createdate as timestamp) as date),'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss') 标准格式化
缺一个都会报错
- java.sql.SQLException: Lock wait timeout exceeded;
- java.sql.SQLException: Lock wait timeout exceeded
- java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
- java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
- Spring 开发笔记之 java.sql.SQLException: Lock wait timeout exceeded | CannotAcquireLockException 的解决
- 数据库锁等待超时 java.sql.SQLException: Lock wait timeout exceeded
- 数据库锁等待超时 java.sql.SQLException: Lock wait timeout exceeded
- Spring之—— java.sql.SQLException: Lock wait timeout exceeded | CannotAcquireLockException 的解决
- Lock wait timeout exceeded
- Lock wait timeout exceeded
- Lock wait timeout exceeded
- MySql Lock wait timeout exceeded
- Lock wait timeout exceeded异常
- Lock wait timeout exceeded; 磁盘满,导致。
- Lock wait timeout exceeded; try restarting transaction
- mysql error:Lock wait timeout exceeded解决
- Lock wait timeout exceeded; try restarting transaction
- mysql提示 Lock wait timeout exceeded解决办法
- CSS3文本溢出
- Android 蓝牙开发小结与探讨
- Windows2008 Server 常规设置及基本安全策略
- 算法导论 O(n)时间内反转单链表
- Two Sum
- java.sql.SQLException: Lock wait timeout exceeded;
- Jbrowse中的BigWig Tracks配置
- iOS 进阶面试题-Block部分
- 浅析多线程及用法(实例)
- CString string CStringA CStringW string wstring 等字符串转换汇总
- 类似微博快速操作弹出界面
- 汇编语言第二版-第一章
- Xcode更新之后提示App Transport Security has blocked a cleartext HTTP(http://)resource load since it is ...
- 用vlookup函数提取字符串中的数字