Lock wait timeout exceeded; try restarting transactionITeye - 娱乐之横扫全球

Lock wait timeout exceeded; try restarting transactionITeye

2019-01-12 10:48:17 | 作者: 辰沛 | 标签: 运用,履行,更新 | 浏览: 392

运用结构:Spring3.0 + Hibernate3.5 + MySQLrnrn运用Spring业务管理器对业务管理,Service效劳中运用@Transactional注解声明要运用的业务管理器rnrnrn1、下位机每隔100毫秒向上位机发送心跳,会依据主键对[b]itemgroup[/b]表先[b]Select[/b]查询,再履行[b]update[/b]更新操作(更新[b]last_online_time[/b]时刻戳字段),update句子如下:rnrnUPDATE itemgroup SET alarm_num=?, downline_times=?, fault_num=?, last_check_time=?, last_downline_time=?, last_notice_time=?, last_online_time=?, online_duration=? WHERE id=?rnrn2、上位机每隔10秒会对[b]itemgroup[/b]表进行[b]Select[/b]查询,并履行[b]update[/b]操作(更新[b]last_check_time[/b]时刻戳字段),update句子如下:rnrnUPDATE itemgroup SET alarm_num=?, downline_times=?, fault_num=?, last_check_time=?, last_downline_time=?, last_notice_time=?, last_online_time=?, online_duration=? WHERE id=?rnrnrn通过四五十分钟,呈现rn“org.springframework.jdbc.UncategorizedSQLException: Hibernate flushing: Could not execute JDBC batch update; uncategorized SQLException for SQL [update itemgroup set alarm_num=?, downline_times=?, fault_num=?, last_check_time=?, last_downline_time=?, last_notice_time=?, last_online_time=?, online_duration=? where id=?]; SQL state [41000]; error code [1205];[color=#FF0000] Lock wait timeout exceeded; try restarting transaction; nested exception is java.sql.BatchUpdateException: Lock wait timeout exceeded; try restarting transaction[/color][b][/b]”反常rnrn履行MySQL show full processlist指令,发现存在死锁。请问该问题怎么处理?谢谢!!!!rnrnrnrn

版权声明
本文来源于网络,版权归原作者所有,其内容与观点不代表娱乐之横扫全球立场。转载文章仅为传播更有价值的信息,如采编人员采编有误或者版权原因,请与我们联系,我们核实后立即修改或删除。

猜您喜欢的文章