当前位置:网站首页>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 .
边栏推荐
- Unity3D制作注册登录界面,并实现场景跳转
- Basic operations of databases and tables ----- creating data tables
- ES6 grammar summary -- Part I (basic)
- Gravure sans fil Bluetooth sur micro - ordinateur à puce unique
- Basic operations of databases and tables ----- view data tables
- Common properties of location
- . elf . map . list . Hex file
- idea问题记录
- Minio file download problem - inputstream:closed
- Gateway 根据服务名路由失败,报错 Service Unavailable, status=503
猜你喜欢
Esp8266 uses Arduino to connect Alibaba cloud Internet of things
Générateur d'identification distribué basé sur redis
[esp32 learning-1] construction of Arduino esp32 development environment
Arm pc=pc+8 is the most understandable explanation
2021.11.10 compilation examination
Single chip Bluetooth wireless burning
(1) Introduction Guide to R language - the first step of data analysis
ESP learning problem record
ES6语法总结--下篇(进阶篇 ES6~ES11)
Conditional probability
随机推荐
PT OSC deadlock analysis
[Offer18]删除链表的节点
js题目:输入数组,最大的与第一个元素交换,最小的与最后一个元素交换,输出数组。
[899]有序队列
SSD technical features
Arduino gets the length of the array
Solution to the problem of automatic login in Yanshan University Campus Network
The dolphin scheduler remotely executes shell scripts through the expect command
Vscode basic configuration
ESP8266连接onenet(旧版MQTT方式)
There is no red exclamation mark after SVN update
C programming exercise
Esp8266 connect onenet (old mqtt mode)
Detailed explanation of truncate usage
(4) Data visualization of R language -- matrix chart, histogram, pie chart, scatter chart, linear regression and strip chart
[offer78] merge multiple ordered linked lists
Whistle+switchyomega configure web proxy
JUC forkjoin and completable future
MySQL takes up too much memory solution
编译原理:源程序的预处理及词法分析程序的设计与实现(含代码)