Lock wait timeout exceeded; try restarting transaction ### The error may involve defaultParameterMap
时间: 2023-10-15 21:23:59 浏览: 153
异常信息中的"Lock wait timeout exceeded; try restarting transaction"表示在数据库操作时,由于加锁等待的时间超过了设定的时间,导致事务超时。[1]
这个错误可能涉及到"defaultParameterMap"。这是一个可能出现问题的参数映射。然而,具体的错误原因需要进一步分析。根据引用中的分析得知,在高并发的情况下,Spring事务可能会导致数据库死锁,从而导致后续操作超时并抛出异常。此外,MySQL数据库的默认参数"innodb_lock_wait_timeout"设置了锁等待的时间为50秒,一旦数据库锁超过这个时间就会报错。所以,可能的原因是在高并发情况下,事务操作等待的时间超过了设定的锁等待时间,导致超时异常。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [Mysql事物锁等待超时 Lock wait timeout exceeded; try restarting transaction](https://blog.csdn.net/suixinsuoyu12519/article/details/119170813)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [Lock wait timeout exceeded; try restarting transaction](https://blog.csdn.net/qq_41482600/article/details/126579106)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文