当前位置:网站首页>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 .
边栏推荐
- [Red Treasure Book Notes simplified version] Chapter 12 BOM
- Kconfig Kbuild
- idea问题记录
- Office提示您的许可证不是正版弹框解决
- Learning notes of JS variable scope and function
- [899]有序队列
- Working principle of genius telephone watch Z3
- CUDA C programming authoritative guide Grossman Chapter 4 global memory
- Rough analysis of map file
- Générateur d'identification distribué basé sur redis
猜你喜欢

Force buckle 1189 Maximum number of "balloons"

MySQL占用内存过大解决方案

ORA-02030: can only select from fixed tables/views

Classification, understanding and application of common methods of JS array

Redis based distributed locks and ultra detailed improvement ideas

JS变量类型以及常用类型转换

Unity3D制作注册登录界面,并实现场景跳转

(3) Introduction to bioinformatics of R language - function, data Frame, simple DNA reading and analysis

Gravure sans fil Bluetooth sur micro - ordinateur à puce unique

There is no red exclamation mark after SVN update
随机推荐
[offer9] implement queues with two stacks
如何给Arduino项目添加音乐播放功能
. elf . map . list . Hex file
Common DOS commands
Types de variables JS et transformations de type communes
Latex learning
Force buckle 1189 Maximum number of "balloons"
基于Redis的分布式锁 以及 超详细的改进思路
Classification, understanding and application of common methods of JS array
[leetcode622]设计循环队列
JS變量類型以及常用類型轉換
[899]有序队列
open-mmlab labelImg mmdetection
Redis based distributed locks and ultra detailed improvement ideas
(一)R语言入门指南——数据分析的第一步
Arduino gets the length of the array
记一次云服务器被密码爆破的经历——关小黑屋、改密码、改端口
ORA-02030: can only select from fixed tables/views
JUC forkjoin and completable future
ES6 grammar summary -- Part 2 (advanced part es6~es11)