当前位置:网站首页>Lock wait timeout exceeded try restarting transaction
Lock wait timeout exceeded try restarting transaction
2022-07-06 12:35:00 【wx5caecf2ed0645】
There have been frequent occurrences in recent projects Lock wait timeout exceeded; try restarting transaction This mistake , It makes us miserable , To solve the problem , Find a lot of information on the Internet , Finally, the problem reappears . The specific operation steps are as follows ( I use mysql The tool is navicat):
First step : Turn on sql Command page
The second step : Input start transaction; Start a transaction
The third step : Input update sentence UPDATE TABLENAME set time=null where id=29163;( Remember not to Submit (commit;))
Step four : Writing tests
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | |
Run the program and run the following 3 individual sql View results
1 2 3 | |
Get the following run results . We found several others trx_state Status is LOCK WAIT, Get the result we want to reproduce
Step five : Wait for the error to appear , After waiting for a period of time, we will find that the program reports an error
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | |
The results obtained from the above , You can know that this error occurs when a transaction is not committed , Other transactions also operate on the same object , So we found the cause of the problem , We can modify it according to this situation .
This is the mistake I encountered this time , Let me share with you , To avoid such a situation in the program .
边栏推荐
- [esp32 learning-1] construction of Arduino esp32 development environment
- Mp3mini playback module Arduino < dfrobotdfplayermini H> function explanation
- PT OSC deadlock analysis
- Naive Bayesian theory derivation
- @Autowired 和 @Resource 的区别
- Navigator object (determine browser type)
- MySQL takes up too much memory solution
- Important methods of array and string
- SVN更新后不出现红色感叹号
- Derivation of logistic regression theory
猜你喜欢
程序设计大作业:教务管理系统(C语言)
Arduino JSON data information parsing
Redis 缓存更新策略,缓存穿透、雪崩、击穿问题
Gravure sans fil Bluetooth sur micro - ordinateur à puce unique
ORA-02030: can only select from fixed tables/views
Force buckle 1189 Maximum number of "balloons"
MySQL時間、時區、自動填充0的問題
Basic operations of databases and tables ----- creating data tables
Understanding of AMBA, AHB, APB and Axi
Remember an experience of ECS being blown up by passwords - closing a small black house, changing passwords, and changing ports
随机推荐
ES6 grammar summary -- Part I (basic)
Minio file download problem - inputstream:closed
Unity3D摄像机,键盘控制前后左右上下移动,鼠标控制旋转、放缩
Latex learning
idea中好用的快捷键
Design and implementation of general interface open platform - (39) simple and crude implementation of API services
基於Redis的分布式ID生成器
Redis based distributed ID generator
@Autowired 和 @Resource 的区别
Arduino gets the length of the array
NRF24L01 troubleshooting
Understanding of AMBA, AHB, APB and Axi
Office提示您的许可证不是正版弹框解决
Basic operations of databases and tables ----- modifying data tables
1081 rational sum (20 points) points add up to total points
idea中导包方法
SSD technical features
Single chip Bluetooth wireless burning
Redis 缓存更新策略,缓存穿透、雪崩、击穿问题
Unity scene jump and exit