473,241 Members | 1,666 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,241 software developers and data experts.

Deadlock found when trying to get lock (MySQL 5.0 with innodb)

Hi!

We are using apache ibatis with our MySQL 5.0 database (using innodb
tables), in our web application running on Tomcat 5. Recently we
started getting a number of errors relating to
java.sql.SQLException: Deadlock found when trying to get lock; Try
restarting transaction message from server: "Lock wait timeout
exceeded; try restarting transaction";

We get such errors generally on inserts or updates while applying a
parameter map - see full exception dump below. It takes a tomcat/web
application restart to fix the problem. We've checked "SHOW INNODB
STATUS" on our database and it does not show any deadlock errors (no
LAST DEADLOCK ERROR section).

We would appreciate any suggestions or ideas you have to fix or
alleviate this problem. Thanks :)
Full exception dump:
note: my.application.* is our application code

2006-12-08 23:48:32,347 ERROR [TP-Processor24] servlet.FrameworkServlet
(FrameworkServlet.java:412) - Could not complete request
org.springframework.jdbc.UncategorizedSQLException : SqlMapClient
operation; uncategorized SQLException for SQL []; SQL state [41000];
error code [1205];
--- The error occurred in
my/application/engine/dao/ibatis/maps/Section.xml.
--- The error occurred while applying a parameter map.
--- Check the updateSectionExperience-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: java.sql.SQLException: Deadlock found when trying to get
lock; Try restarting transaction message from server: "Lock wait
timeout exceeded; try restarting transaction"; nested exception is
com.ibatis.common.jdbc.exception.NestedSQLExceptio n:
--- The error occurred in
my/application/engine/dao/ibatis/maps/Section.xml.
--- The error occurred while applying a parameter map.
--- Check the updateSectionExperience-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: java.sql.SQLException: Deadlock found when trying to get
lock; Try restarting transaction message from server: "Lock wait
timeout exceeded; try restarting transaction"
com.ibatis.common.jdbc.exception.NestedSQLExceptio n:
--- The error occurred in
my/application/engine/dao/ibatis/maps/Section.xml.
--- The error occurred while applying a parameter map.
--- Check the updateSectionExperience-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: java.sql.SQLException: Deadlock found when trying to get
lock; Try restarting transaction message from server: "Lock wait
timeout exceeded; try restarting transaction"
Caused by: java.sql.SQLException: Deadlock found when trying to get
lock; Try restarting transaction message from server: "Lock wait
timeout exceeded; try restarting transaction"
at
com.ibatis.sqlmap.engine.mapping.statement.General Statement.executeUpdate(GeneralStatement.java:91)
at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelega te.update(SqlMapExecutorDelegate.java:500)
at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.up date(SqlMapSessionImpl.java:85)
at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.upd ate(SqlMapClientImpl.java:62)
at
org.springframework.orm.ibatis.SqlMapClientTemplat e$10.doInSqlMapClient(SqlMapClientTemplate.java:32 9)
at
org.springframework.orm.ibatis.SqlMapClientTemplat e.execute(SqlMapClientTemplate.java:165)
at
org.springframework.orm.ibatis.SqlMapClientTemplat e.update(SqlMapClientTemplate.java:327)
at
org.springframework.orm.ibatis.SqlMapClientTemplat e.update(SqlMapClientTemplate.java:349)
at
my.application.engine.dao.ibatis.SqlMapSectionDao. updateSectionExperience(Unknown
Source)
at
my.application.engine.domain.logic.SystemImpl.upda teSectionExperience(Unknown
Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:335)
at
org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.java:181)
at
org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :148)
at
org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:96)
at
org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :170)
at
org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:176)
at $Proxy0.updateSectionExperience(Unknown Source)
at
my.application.engine.web.SectionFormController.pr ocessFinish(Unknown
Source)
at
org.springframework.web.servlet.mvc.AbstractWizard FormController.validatePagesAndFinish(AbstractWiza rdFormController.java:667)
at
org.springframework.web.servlet.mvc.AbstractWizard FormController.processFormSubmission(AbstractWizar dFormController.java:490)
at
org.springframework.web.servlet.mvc.AbstractFormCo ntroller.handleRequestInternal(AbstractFormControl ler.java:259)
at
org.springframework.web.servlet.mvc.AbstractContro ller.handleRequest(AbstractController.java:139)
at
org.springframework.web.servlet.mvc.SimpleControll erHandlerAdapter.handle(SimpleControllerHandlerAda pter.java:44)
at
org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:717)
at
org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:658)
at
org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:392)
at
org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:357)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
at
org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:214)
at
org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
at
org.apache.catalina.core.StandardContextValve.invo keInternal(StandardContextValve.java:198)
at
org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:152)
at
org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
at
org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:137)
at
org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
at
org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:118)
at
org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
at
org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
at
org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
at
org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:929)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(Co yoteAdapter.java:160)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyo teHandler.java:300)
at org.apache.jk.common.HandlerRequest.invoke(Handler Request.java:374)
at org.apache.jk.common.ChannelSocket.invoke(ChannelS ocket.java:743)
at
org.apache.jk.common.ChannelSocket.processConnecti on(ChannelSocket.java:675)
at org.apache.jk.common.SocketConnection.runIt(Channe lSocket.java:866)
at
org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.sql.SQLException: Deadlock found when trying to get
lock; Try restarting transaction message from server: "Lock wait
timeout exceeded; try restarting transaction"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.ja va:1997)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:11 67)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java :1278)
at com.mysql.jdbc.Connection.execSQL(Connection.java: 2247)
at
com.mysql.jdbc.PreparedStatement.execute(PreparedS tatement.java:1371)
at
org.apache.commons.dbcp.DelegatingPreparedStatemen t.execute(DelegatingPreparedStatement.java:168)
at sun.reflect.GeneratedMethodAccessor40.invoke(Unkno wn Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
com.ibatis.common.jdbc.logging.PreparedStatementLo gProxy.invoke(PreparedStatementLogProxy.java:62)
at $Proxy3.execute(Unknown Source)
at
com.ibatis.sqlmap.engine.execution.SqlExecutor.exe cuteUpdate(SqlExecutor.java:84)
at
com.ibatis.sqlmap.engine.mapping.statement.General Statement.sqlExecuteUpdate(GeneralStatement.java:2 00)
at
com.ibatis.sqlmap.engine.mapping.statement.General Statement.executeUpdate(GeneralStatement.java:78)
... 58 more

Caused by:
java.sql.SQLException: Deadlock found when trying to get lock; Try
restarting transaction message from server: "Lock wait timeout
exceeded; try restarting transaction"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.ja va:1997)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:11 67)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java :1278)
at com.mysql.jdbc.Connection.execSQL(Connection.java: 2247)
at
com.mysql.jdbc.PreparedStatement.execute(PreparedS tatement.java:1371)
at
org.apache.commons.dbcp.DelegatingPreparedStatemen t.execute(DelegatingPreparedStatement.java:168)
at sun.reflect.GeneratedMethodAccessor40.invoke(Unkno wn Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
com.ibatis.common.jdbc.logging.PreparedStatementLo gProxy.invoke(PreparedStatementLogProxy.java:62)
at $Proxy3.execute(Unknown Source)
at
com.ibatis.sqlmap.engine.execution.SqlExecutor.exe cuteUpdate(SqlExecutor.java:84)
at
com.ibatis.sqlmap.engine.mapping.statement.General Statement.sqlExecuteUpdate(GeneralStatement.java:2 00)
at
com.ibatis.sqlmap.engine.mapping.statement.General Statement.executeUpdate(GeneralStatement.java:78)
at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelega te.update(SqlMapExecutorDelegate.java:500)
at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.up date(SqlMapSessionImpl.java:85)
at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.upd ate(SqlMapClientImpl.java:62)
at
org.springframework.orm.ibatis.SqlMapClientTemplat e$10.doInSqlMapClient(SqlMapClientTemplate.java:32 9)
at
org.springframework.orm.ibatis.SqlMapClientTemplat e.execute(SqlMapClientTemplate.java:165)
at
org.springframework.orm.ibatis.SqlMapClientTemplat e.update(SqlMapClientTemplate.java:327)
at
org.springframework.orm.ibatis.SqlMapClientTemplat e.update(SqlMapClientTemplate.java:349)
at
my.application.engine.dao.ibatis.SqlMapSectionDao. updateSectionExperience(Unknown
Source)
at
my.application.engine.domain.logic.SystemImpl.upda teSectionExperience(Unknown
Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:335)
at
org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.java:181)
at
org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :148)
at
org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:96)
at
org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :170)
at
org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:176)
at $Proxy0.updateSectionExperience(Unknown Source)
at
my.application.engine.web.SectionFormController.pr ocessFinish(Unknown
Source)
at
org.springframework.web.servlet.mvc.AbstractWizard FormController.validatePagesAndFinish(AbstractWiza rdFormController.java:667)
at
org.springframework.web.servlet.mvc.AbstractWizard FormController.processFormSubmission(AbstractWizar dFormController.java:490)
at
org.springframework.web.servlet.mvc.AbstractFormCo ntroller.handleRequestInternal(AbstractFormControl ler.java:259)
at
org.springframework.web.servlet.mvc.AbstractContro ller.handleRequest(AbstractController.java:139)
at
org.springframework.web.servlet.mvc.SimpleControll erHandlerAdapter.handle(SimpleControllerHandlerAda pter.java:44)
at
org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:717)
at
org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:658)
at
org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:392)
at
org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:357)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
at
org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:214)
at
org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
at
org.apache.catalina.core.StandardContextValve.invo keInternal(StandardContextValve.java:198)
at
org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:152)
at
org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
at
org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:137)
at
org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
at
org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:118)
at
org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
at
org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
at
org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
at
org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:929)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(Co yoteAdapter.java:160)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyo teHandler.java:300)
at org.apache.jk.common.HandlerRequest.invoke(Handler Request.java:374)
at org.apache.jk.common.ChannelSocket.invoke(ChannelS ocket.java:743)
at
org.apache.jk.common.ChannelSocket.processConnecti on(ChannelSocket.java:675)
at org.apache.jk.common.SocketConnection.runIt(Channe lSocket.java:866)
at
org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)

Dec 11 '06 #1
0 11668

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jeremiah Jacks | last post by:
I just upgraded to MySQL 4.0.14-standard for RedHat Linux and am using = the pre-compiled binaries. I have a database with INNODB tables. When I insert a row into one of the child tables, I get...
8
by: Anita | last post by:
Hi All, Can multiple updates on one table using single query generate deadlock ? For example, at the same time, there are 2 users run 2 queries as follows : User1 runs : update tab1 set...
0
by: steven | last post by:
In both mysql version 4.0.16 and 4.1.8 I'm running into deadlock behavior that I don't understand: can anyone explain why the following happens? Heres a basic table definition that exhibits the...
2
by: Alex | last post by:
I was hoping someone could confirm my understanding of how InnoDB handles deadlocks (error 1213) and timeouts (error 1206). The way I understand it, with AUTOCOMMIT=0, if I issue 3 SQL statements...
3
by: Nigel Robbins | last post by:
Hi There, I'm getting a deadlock when I have two clients running the following statement. DELETE FROM intermediate.file_os_details WHERE file_uid = ? AND obj_uid There is a compound index on...
1
by: Rohit Raghuwanshi | last post by:
Hello all, we are running a delphi application with DB2 V8.01 which is causing deadlocks when rows are being inserted into a table. Attaching the Event Monitor Log (DEADLOCKS WITH DETAILS) here....
0
by: fuzzybr80 | last post by:
Hi, I am working with an application with a high rate of inserts/updates/deletes into a particular table, and recently am getting the following error code. My table uses InnoDB engine. ERROR...
1
by: Arif Mohammed | last post by:
Hi, iam using MySql 4.0.1 and jboss-4.0.4.GA Iam getting the following exception when there are more concurrent requests more than 50 in a second Caused by: org.xyz.MyClass: SQL...
1
by: kalpacx | last post by:
Hi All, I am a newbie to db2 database. Currently i am facing an issue which i know for sure that many would have faced and resolved. I am running 6 sql scripts concurrently against the db ...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.