博客
关于我
Lock wait timeout exceeded; try restarting transaction mysql报错
阅读量:791 次
发布时间:2023-02-06

本文共 793 字,大约阅读时间需要 2 分钟。

Lock wait timeout exceeded; try restarting transaction mysql报错

提示:最近项目中频繁出现 Lock wait timeout exceeded; try restarting transaction这个错误,把我们弄得痛苦不堪啊,为了解决问题,上网上找好多资料。

终于把问题复现了。具体操作步骤如下(我使用的mysql工具是 navicat):

第一步:开启sql命令页面

输入start transaction;开启一个事务

输入update语句不要提交

运行程序

public class StTest implements Runnable{private static ApplicationContext applicationContext=null;private static AtomicInteger a=new AtomicInteger(0);static {applicationContext=new ClassPathXmlApplicationContext("classpath:application.xml");}public static void main(String[] args) throws Exception {ExecutorService executorService = Executors.newFixedThreadPool(10);for (int i = 0; i <10 ; i++) {executorService.execute(new aaaa());}if(!executorService.isTerminated()){executorService.shutdown();}}@Overridepublic void run() {

}

转载地址:http://ibufk.baihongyu.com/

你可能感兴趣的文章
LoadRunner性能测试基本步骤
查看>>
loadrunner手动生成脚本函数
查看>>
LoadRunner测试下载文件
查看>>
Loadrunner脚本编程(4)-数据类型操作和字符串操作
查看>>
LoadRunner运行中的mmdrv和mdrv
查看>>
load和DOMContenLoaded的区别
查看>>
Lobe-Chat Docker重启后注册选项自动启用?一键脚本部署后的解决方法
查看>>
Lobe-Chat无法使用英伟达DeepSeek模型的解决方法
查看>>
LobeChat 通过环境变量实现配置功能控制指南
查看>>
LobeChat如何通过URL链接分享配置参数教程
查看>>
LobeChat配置OPENAI_PROXY_URL返回空值,如何解决?
查看>>
LocalDateTime处理
查看>>
localhost 目前无法处理此请求。 HTTP ERROR 500
查看>>
localhost与127.0.0.1,本地主机与IP地址之争!
查看>>
localhost:5000在MacOS V12(蒙特利)中不可用
查看>>
locals 和 globals
查看>>
localStorage使用总结
查看>>
location.href的几种用法
查看>>
location.href表示当前访问的网址url
查看>>
location优先级别问题
查看>>