当前位置:网站首页>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 .
边栏推荐
- (1) Introduction Guide to R language - the first step of data analysis
- 单片机蓝牙无线烧录
- [leetcode19]删除链表中倒数第n个结点
- Mp3mini playback module Arduino < dfrobotdfplayermini H> function explanation
- Common DOS commands
- Design and implementation of general interface open platform - (39) simple and crude implementation of API services
- Kconfig Kbuild
- 记一次云服务器被密码爆破的经历——关小黑屋、改密码、改端口
- ES6 grammar summary -- Part 2 (advanced part es6~es11)
- Solution to the problem of automatic login in Yanshan University Campus Network
猜你喜欢

Vscode basic configuration

Basic operations of databases and tables ----- modifying data tables

Arduino uno R3 register writing method (1) -- pin level state change

JS 函数提升和var变量的声明提升

(五)R语言入门生物信息学——ORF和序列分析

There is no red exclamation mark after SVN update

MySQL占用内存过大解决方案

Learning notes of JS variable scope and function

idea问题记录

Redis cache update strategy, cache penetration, avalanche, breakdown problems
随机推荐
There is no red exclamation mark after SVN update
Detailed explanation of truncate usage
Common properties of location
js 变量作用域和函数的学习笔记
Servlet
Arduino get random number
Flink late data processing (3)
History object
CUDA C programming authoritative guide Grossman Chapter 4 global memory
MySQL时间、时区、自动填充0的问题
Force buckle 1189 Maximum number of "balloons"
Derivation of logistic regression theory
Unity3D摄像机,键盘控制前后左右上下移动,鼠标控制旋转、放缩
Programming homework: educational administration management system (C language)
Minio文件下载问题——inputstream:closed
JS function promotion and declaration promotion of VaR variable
ESP8266连接onenet(旧版MQTT方式)
Symbolic representation of functions in deep learning papers
JS Title: input array, exchange the largest with the first element, exchange the smallest with the last element, and output array.
js题目:输入数组,最大的与第一个元素交换,最小的与最后一个元素交换,输出数组。