博客
关于我
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/

你可能感兴趣的文章
Lua,Lua API,配置文件
查看>>
Lucence简单学习---1
查看>>
Lucene.Net 站内搜索
查看>>
lucene4.7 正则查询(RegexpQuery)(八)
查看>>
lucene: 索引建立完后无法查看索引文件中的数据
查看>>
Lucene从入门到精通
查看>>
lucene思维导图,让搜索引擎不再难懂
查看>>
Lucene(10):Lucene相关度排序
查看>>
Lucene(11):搜索案例
查看>>
Lucene(1):Lucene介绍
查看>>
Lucene(2):Lucene全文检索的流程
查看>>
Lucene(4):Field域类型
查看>>
Lucene(5):索引维护
查看>>
Lucene(6):分词器
查看>>
Lucene(7):Lucene高级搜索
查看>>
Lucene(8):Lucene底层储存结构
查看>>
Lucene(9):Lucene优化
查看>>
luckyexcel 编辑预览excel文件
查看>>
lumen php命令,浅谈lumen的自定义依赖注入
查看>>
lumen开发问题:Call to undefined method Illuminate\Validation\Validator::make()
查看>>