mysql 数据库事务未提交,导致无法操作库;

2017-01-05 11:13:37来源:oschina作者:NotFoundException人点击

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.CannotAcquireLockException:
### Error updating database.Cause: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: DELETE FROM A WHERE id =?
### Cause: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
; SQL []; Lock wait timeout exceeded; try restarting transaction; nested exception is java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:948)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

网络中途掉线,灰复后程序异常:提示说重新restarting transaction;


问题排查:


1.showPROCESSLIST; 未发现表被锁;


2.查看最新事务select * from information_schema.innodb_trx 发现有一条记录;找到对应的trx_mysql_thread_id ; 这个对应PROCESSLIST中的id; kill 对应的id;问题解决

最新文章

123

最新摄影

微信扫一扫

第七城市微信公众平台