By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,827 Members | 813 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,827 IT Pros & Developers. It's quick & easy.

SQL Exception:Deadlock found when trying to get lock; Try restarting

P: 1
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 Exception:Deadlock found when trying to get lock; Try restarting
transaction, message from server: "Lock wait timeout exceeded; Try restarting transaction"
at com.xyz.retrieveDetails(MySessionBean.java:679)
at sun.reflect.GeneratedMethodAccessor132.invoke(Unkn own Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.invocation.Invocation.performCall(Invoca tion.java:359)
at org.jboss.ejb.StatelessSessionContainer$ContainerI nterceptor.invoke(StatelessSessionContainer.java:2 37)
at org.jboss.resource.connectionmanager.CachedConnect ionInterceptor.invoke(CachedConnectionInterceptor. java:158)
at org.jboss.ejb.plugins.StatelessSessionInstanceInte rceptor.invoke(StatelessSessionInstanceInterceptor .java:169)
at org.jboss.ws.server.ServiceEndpointInterceptor.inv oke(ServiceEndpointInterceptor.java:64)
at org.jboss.ejb.plugins.CallValidationInterceptor.in voke(CallValidationInterceptor.java:63)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invoke Next(AbstractTxInterceptor.java:121)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTran sactions(TxInterceptorCMT.java:350)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxIn terceptorCMT.java:181)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(S ecurityInterceptor.java:168)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInt erceptor.java:205)
at org.jboss.ejb.plugins.ProxyFactoryFinderIntercepto r.invoke(ProxyFactoryFinderInterceptor.java:136)
at org.jboss.ejb.SessionContainer.internalInvoke(Sess ionContainer.java:648)
at org.jboss.ejb.Container.invoke(Container.java:954)
at sun.reflect.GeneratedMethodAccessor120.invoke(Unkn own Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invok e(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation .java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.j ava:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Ab stractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanSe rverImpl.java:659)
at org.jboss.invocation.local.LocalInvoker$MBeanServe rAction.invoke(LocalInvoker.java:169)
at org.jboss.invocation.local.LocalInvoker.invoke(Loc alInvoker.java:118)
at org.jboss.invocation.InvokerInterceptor.invokeLoca lMarshalled(InvokerInterceptor.java:292)
at org.jboss.invocation.MarshallingInvokerInterceptor .invoke(MarshallingInvokerInterceptor.java:61)
at org.jboss.proxy.TransactionInterceptor.invoke(Tran sactionInterceptor.java:61)
at org.jboss.proxy.SecurityInterceptor.invoke(Securit yInterceptor.java:70)
at org.jboss.proxy.ejb.StatelessSessionInterceptor.in voke(StatelessSessionInterceptor.java:112)
at org.jboss.proxy.ClientContainer.invoke(ClientConta iner.java:100)
at $Proxy138.retrieveDetails(Unknown Source)
at com.xyz.MyFacadeBean.retrieveDetails(MyFacadeBean. java:173)
at sun.reflect.GeneratedMethodAccessor131.invoke(Unkn own Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.invocation.Invocation.performCall(Invoca tion.java:359)
at org.jboss.ejb.StatelessSessionContainer$ContainerI nterceptor.invoke(StatelessSessionContainer.java:2 37)
at org.jboss.resource.connectionmanager.CachedConnect ionInterceptor.invoke(CachedConnectionInterceptor. java:158)
at org.jboss.ejb.plugins.StatelessSessionInstanceInte rceptor.invoke(StatelessSessionInstanceInterceptor .java:169)
at org.jboss.ws.server.ServiceEndpointInterceptor.inv oke(ServiceEndpointInterceptor.java:64)
at org.jboss.ejb.plugins.CallValidationInterceptor.in voke(CallValidationInterceptor.java:63)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invoke Next(AbstractTxInterceptor.java:121)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTran sactions(TxInterceptorCMT.java:350)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxIn terceptorCMT.java:181)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(S ecurityInterceptor.java:168)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInt erceptor.java:205)
at org.jboss.ejb.plugins.ProxyFactoryFinderIntercepto r.invoke(ProxyFactoryFinderInterceptor.java:136)
at org.jboss.ejb.SessionContainer.internalInvoke(Sess ionContainer.java:648)
at org.jboss.ejb.Container.invoke(Container.java:954)
at sun.reflect.GeneratedMethodAccessor120.invoke(Unkn own Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invok e(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation .java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.j ava:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Ab stractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanSe rverImpl.java:659)
at org.jboss.invocation.jrmp.server.JRMPInvoker$MBean ServerAction.invoke(JRMPInvoker.java:819)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invok e(JRMPInvoker.java:420)
at sun.reflect.GeneratedMethodAccessor123.invoke(Unkn own Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastSe rverRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:1 53)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport. java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages( TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandl er.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:595)
at sun.rmi.transport.StreamRemoteCall.exceptionReceiv edFromServer(StreamRemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall(Str eamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:1 26)
at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub. invoke(Unknown Source)
at org.jboss.invocation.jrmp.interfaces.JRMPInvokerPr oxy.invoke(JRMPInvokerProxy.java:133)
at org.jboss.invocation.InvokerInterceptor.invokeInvo ker(InvokerInterceptor.java:331)
at org.jboss.invocation.MarshallingInvokerInterceptor .invoke(MarshallingInvokerInterceptor.java:63)
at org.jboss.proxy.TransactionInterceptor.invoke(Tran sactionInterceptor.java:61)
at org.jboss.proxy.SecurityInterceptor.invoke(Securit yInterceptor.java:70)
at org.jboss.proxy.ejb.StatelessSessionInterceptor.in voke(StatelessSessionInterceptor.java:112)
at org.jboss.proxy.ClientContainer.invoke(ClientConta iner.java:100)
at $Proxy1.retrieveProvisionDetails(Unknown Source)
... 23 more
]]></stack>
Jul 2 '07 #1
Share this Question
Share on Google+
1 Reply


mwasif
Expert 100+
P: 801
Check mysql connection limit, I am afraid it is set to 50. Check both
max_connections and max_user_connections. check the link http://dev.mysql.com/doc/refman/4.1/...resources.html
Jul 2 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.