Issue Details#966 mysql and player login

  • Priority: Normal
  • Number: 966
  • Type: Bug
  • Status: Closed
  • Age: 1521 Days

Description

I'm not even sure this is an issue with prism or something with the mysql setup - i'm not very database savvy but.... On occasion, when a new player attempts to enter a server for the first time this error is generated. It repeatedly kicks the whole server due to a time out each time that player tries to log in again.

[00:39:01] [Server thread/WARN]: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction [00:39:01] [Server thread/WARN]: at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073) [00:39:01] [Server thread/WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593) [00:39:01] [Server thread/WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525) [00:39:01] [Server thread/WARN]: at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986) [00:39:01] [Server thread/WARN]: at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140) [00:39:01] [Server thread/WARN]: at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626) [00:39:01] [Server thread/WARN]: at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2111) [00:39:01] [Server thread/WARN]: at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2407) [00:39:01] [Server thread/WARN]: at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2325) [00:39:01] [Server thread/WARN]: at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2310) [00:39:01] [Server thread/WARN]: at me.botsko.prism.players.PlayerIdentification.addPlayer(PlayerIdentification.java:219) [00:39:01] [Server thread/WARN]: at me.botsko.prism.players.PlayerIdentification.cachePrismPlayer(PlayerIdentification.java:39) [00:39:01] [Server thread/WARN]: at me.botsko.prism.listeners.PrismPlayerEvents.onPlayerJoin(PrismPlayerEvents.java:111) [00:39:01] [Server thread/WARN]: at sun.reflect.GeneratedMethodAccessor427.invoke(Unknown Source) [00:39:01] [Server thread/WARN]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [00:39:01] [Server thread/WARN]: at java.lang.reflect.Method.invoke(Unknown Source) [00:39:01] [Server thread/WARN]: at us.Myles.PWP.TransparentListeners.PerWorldPluginLoader$1.execute(PerWorldPluginLoader.java:120) [00:39:01] [Server thread/WARN]: at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [00:39:01] [Server thread/WARN]: at us.Myles.PWP.TransparentListeners.PWPRegisteredListener.callEvent(PWPRegisteredListener.java:30) [00:39:01] [Server thread/WARN]: at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [00:39:01] [Server thread/WARN]: at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [00:39:01] [Server thread/WARN]: at net.minecraft.server.v1_8_R2.PlayerList.onPlayerJoin(PlayerList.java:296) [00:39:01] [Server thread/WARN]: at net.minecraft.server.v1_8_R2.PlayerList.a(PlayerList.java:156) [00:39:01] [Server thread/WARN]: at net.minecraft.server.v1_8_R2.LoginListener.b(LoginListener.java:144) [00:39:01] [Server thread/WARN]: at net.minecraft.server.v1_8_R2.LoginListener.c(LoginListener.java:54) [00:39:01] [Server thread/WARN]: at net.minecraft.server.v1_8_R2.NetworkManager.a(NetworkManager.java:231) [00:39:01] [Server thread/WARN]: at net.minecraft.server.v1_8_R2.ServerConnection.c(ServerConnection.java:148) [00:39:01] [Server thread/WARN]: at net.minecraft.server.v1_8_R2.MinecraftServer.A(MinecraftServer.java:809) [00:39:01] [Server thread/WARN]: at net.minecraft.server.v1_8_R2.DedicatedServer.A(DedicatedServer.java:368) [00:39:01] [Server thread/WARN]: at net.minecraft.server.v1_8_R2.MinecraftServer.z(MinecraftServer.java:651) [00:39:01] [Server thread/WARN]: at net.minecraft.server.v1_8_R2.MinecraftServer.run(MinecraftServer.java:554) [00:39:01] [Server thread/WARN]: at java.lang.Thread.run(Unknown Source)

History

voigt Gravatar

voigt May 23, 2015 6:58 AM

Issue reported.

botsko Gravatar

botsko May 23, 2015 3:33 PM

The error means the database is locked for another transaction and can't perform the player lookup.

I believe the only thing in Prism which can cause a lock is the purge cycle. If you have too much data, or your mysql instance is slow, the delete queries can still take time. It's also possible the something else has locked the table.

Try reducing the purge size, or purging more frequently, etc. If you're on a top-of-the-line machine and have only a few gigs of data, db size isn't an issue. But if you have 10GB and are on a slow machine, it really can.

Lock wait timeout exceeded; try restarting transaction

  • Status → Closed

Update Issue

Add your comments to this issue!

Creating a free account will let you immediately report issues on this project, as well as comment on existing issues, save your filters, and more!!