lock wait timeout exceeded -凯发k8国际

`

lock wait timeout exceeded

错误信息:

 

org.springframework.dao.cannotacquirelockexception: ### error updating database. cause: com.mysql.cj.jdbc.exceptions.mysqltransactionrollbackexception: lockwaittimeoutexceeded; try restarting transaction

 

原因:表的某条记录更增操作可能在另外一个大的事务里被锁,锁的时间超过了数据库指定时间(如下图:innodb_lock_wait_timeout=10秒),导致此处获取不到这条数据的锁而报错。

 

 

优化方法:

1.大批量更增执行改成小批量。

2.大事务拆分。

3.数据归档。

分享到:
评论

相关推荐

    解决sqlstate[hy000]: general error: 1205 lock wait timeout exceeded

    kfc系列之 - oracle dba入门mysql(中)

    在另一方释放资源前,会话1和会话2都不可能继续。所以,sql server会选择死锁中的一个会话作为“死锁牺牲品”。 注意:死锁牺牲品的会话会被杀死,事务会被回滚。 注意:死锁与正常的阻塞是两个经常被混淆的概念。...

    报错:job for sshd.service failed because a timeout was exceeded. see "systemctl status sshd.service" and "journalctl -xe" for details. 问题2:程序sftp登陆不上 低版本的连接工具无法连接,现有程序sftp到...

    func_timeout python模块支持以给定的超时时间运行任何现有功能。... raises any exceptions #func# would raise, returns what #func# would return (unless timeout is exceeded), in which case it raises functi

    背景介绍 ...因为这种情况特别多而且繁琐,所以很多语言都有各种自己的实现。最初的第一个 expect 是由 tcl 语言实现的,所以后来的 expect 都大致参考了最初的用法和流程,整体来说大致的流程包括: ...

    php fatal error: maximum execution time of 30 seconds exceeded in … ok,先列出现在的配置: php-fpm: request_terminate_timeout = 0 php.ini: max_execution_time = 30 先查阅了一下php-fpm文件中关于request...

    saber入门实验指导书,很好的saber入门级资料。

    how to investigate timeouts in synchronous xi pi 如何解决pi超时问题

    背景 最新有同事反馈,服务间有调用超时的现象,在业务高峰期发生的...post http://host/v1/xxxx: net/http: request canceled while waiting for connection (client.timeout exceeded while awaiting headers) 通知日

    windows2008默认是禁ping的,需要开通方可被ping

    64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=1 ttl=50 time=27.5 ms 64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=2 ttl=50 time=26.8 ms 64 bytes from 220.181.38.148

    hive报hdfs exceeded directory item limit错误,是由于每次任务失败或者异常退出会造成存在hdfs上的临时目录不自动删除,hdfs目录文件数达到上限,可以脚本清理旧的无用目录解决

    openssh的默认服务器配置在管理连接槽的实现上存在拒绝服务漏洞,远程攻击者可利用此漏洞耗尽服务器上连接槽,触发拒绝服务。

    每在页面中上传较大的文件时遇到fastcgi的错误:“the fastcgi process exceeded configured request timeout”,几经试验,明白了需要修改fastcgi的配置文件“fcgiext.ini”,位于目录“c:/windows/system32/...

    代码如下:cgi timeout the specified cgi application exceeded the allowed time for processing. the server has deleted the process. 在iis官方论坛中提到这是由于服务器端会将cgi当作一个可执行文件执行。原帖...

    最近做的程序中涉及到的循环比较多且处理的情况较复杂,在运行程序时出现执行超时提示如下:fatal error: maximum execution time of 30 seconds exceeded in d:phpappservwwwsum3test.php on line 3通过在网上搜索...

    非最大抑制算法:作为faster rcnn中的一部分,主要用于去除掉与得分最高的物体框的iou值大于threadd其他物体框;soft-nms原代码,包括python版、pytorch版,

    一、啥时候用到  用来设置请求资源和服务器返回的时间,保证一个请求占用固定时间,超出后报504超时!这样可以保证一个请求占用过长时间。 二、主要参数  使用nginx服务器如果遇到... fastcgi_read_timeout是指fast

global site tag (gtag.js) - google analytics
网站地图