-
Lock Wait Timeout!
Code:
java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.ja
va:1734)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
:2019)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
:1937)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
:1922)
at client.MapleCharacter.saveToDB(MapleCharacter.java:4709)
at client.MapleClient.disconnect(MapleClient.java:649)
at net.MapleServerHandler.sessionClosed(MapleServerHandler.java:117)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.sess
ionClosed(DefaultIoFilterChain.java:662)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSession
Closed(DefaultIoFilterChain.java:386)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$900(Defa
ultIoFilterChain.java:51)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.ses
sionClosed(DefaultIoFilterChain.java:797)
at org.apache.mina.filter.codec.ProtocolCodecFilter.sessionClosed(Protoc
olCodecFilter.java:317)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSession
Closed(DefaultIoFilterChain.java:386)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$900(Defa
ultIoFilterChain.java:51)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.ses
sionClosed(DefaultIoFilterChain.java:797)
at org.apache.mina.core.filterchain.IoFilterAdapter.sessionClosed(IoFilt
erAdapter.java:95)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSession
Closed(DefaultIoFilterChain.java:386)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireSessionClos
ed(DefaultIoFilterChain.java:379)
at org.apache.mina.core.service.IoServiceListenerSupport.fireSessionDest
royed(IoServiceListenerSupport.java:210)
IoSession with /92.98.12.113:51957 opened.
at org.apache.mina.core.polling.AbstractPollingIoProcessor.removeNow(Abs
tractPollingIoProcessor.java:535)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.removeSession
s(AbstractPollingIoProcessor.java:497)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(Ab
stractPollingIoProcessor.java:61)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run
(AbstractPollingIoProcessor.java:974)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnabl
e.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.sql.SQLException: java.lang.OutOfMemoryError: Java heap space
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)error pe
rsisting cheatlogjava.sql.SQLException: java.lang.OutOfMemoryError: Java heap sp
ace
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler i
n thread "RMI RenewClean-[64.74.97.237:52714,javax.rmi.ssl.SslRMIClientSocketFac
tory@349920f6]"
Exception caused by Osque
java.lang.OutOfMemoryError: Java heap space
Error persisting cheatlogjava.sql.SQLException: java.lang.OutOfMemoryError: Java
heap space
Been having trouble with this error for ages and I have no idea whats causing it.
Straight after that I get an out of memory error and im asuming thats because of the lock wait timeout?
But it instantly crashes the server, the line the error is at in mapleclient is the savetodb(true) line and the line the error is at in maplecharacter is the executeupdate line of savetodb. It cant be because of my database because its a new database that had just been wiped.
Any ideas? Thanks in advance
-
Re: Lock Wait Timeout!
Not 100% sure, but I believe this occurs when you no longer have an open connection to the db, like a deadlock.
-
Re: Lock Wait Timeout!
The error occurs because the transaction is waiting on row(s) of data to update which is already been locked by some other transaction.
Basically a deadlock.