MySQL connector does not autoconnect.
Psithief opened this issue ยท 1 comments
@Tux2
I mainly notice these when the server is in 'test' mode. If a user doesn't connect for a long time the database connection becomes invalid and needs to be renewed.
01:15:13 [SEVERE] com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 47,380,741 milliseconds ago. The last packet sent successfully to the server was 47,380,741 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
01:15:13 [SEVERE] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
01:15:13 [SEVERE] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
01:15:13 [SEVERE] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
01:15:13 [SEVERE] at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
01:15:13 [SEVERE] at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
01:15:13 [SEVERE] at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
01:15:13 [SEVERE] at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3348)
01:15:13 [SEVERE] at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1967)
01:15:13 [SEVERE] at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
01:15:13 [SEVERE] at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2620)
01:15:13 [SEVERE] at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2570)
01:15:13 [SEVERE] at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1474)
01:15:13 [SEVERE] at uk.co.tggl.pluckerpluck.multiinv.mysql.SqlConnector.tableExists(SqlConnector.java:35)
01:15:13 [SEVERE] at uk.co.tggl.pluckerpluck.multiinv.mysql.SqlConnector.createRecord(SqlConnector.java:251)
01:15:13 [SEVERE] at uk.co.tggl.pluckerpluck.multiinv.mysql.SqlConnector.saveInventory(SqlConnector.java:229)
01:15:13 [SEVERE] at uk.co.tggl.pluckerpluck.multiinv.player.MIPlayer.saveInventory(MIPlayer.java:64)
01:15:13 [SEVERE] at uk.co.tggl.pluckerpluck.multiinv.listener.MIPlayerListener.savePlayerState(MIPlayerListener.java:205)
01:15:13 [SEVERE] at uk.co.tggl.pluckerpluck.multiinv.player.DeferredWorldCheck.run(DeferredWorldCheck.java:27)
01:15:13 [SEVERE] at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:126)
01:15:13 [SEVERE] at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:510)
01:15:13 [SEVERE] at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:212)
01:15:13 [SEVERE] at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:474)
01:15:13 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:406)
01:15:13 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)
01:15:13 [SEVERE] Caused by: java.net.SocketException: Broken pipe
01:15:13 [SEVERE] at java.net.SocketOutputStream.socketWrite0(Native Method)
01:15:13 [SEVERE] at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
01:15:13 [SEVERE] at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
01:15:13 [SEVERE] at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
01:15:13 [SEVERE] at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
01:15:13 [SEVERE] at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3329)
01:15:13 [SEVERE] ... 17 more
01:15:13 [SEVERE] com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'multiinv_multiinv' already exists
01:15:13 [SEVERE] at sun.reflect.GeneratedConstructorAccessor130.newInstance(Unknown Source)
01:15:13 [SEVERE] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
01:15:13 [SEVERE] at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
01:15:13 [SEVERE] at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
01:15:13 [SEVERE] at com.mysql.jdbc.Util.getInstance(Util.java:382)
01:15:13 [SEVERE] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
01:15:13 [SEVERE] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593)
01:15:13 [SEVERE] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525)
01:15:13 [SEVERE] at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)
01:15:13 [SEVERE] at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
01:15:13 [SEVERE] at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2620)
01:15:13 [SEVERE] at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1662)
01:15:13 [SEVERE] at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1581)
01:15:13 [SEVERE] at uk.co.tggl.pluckerpluck.multiinv.mysql.SqlConnector.createTable(SqlConnector.java:83)
01:15:13 [SEVERE] at uk.co.tggl.pluckerpluck.multiinv.mysql.SqlConnector.createRecord(SqlConnector.java:252)
01:15:13 [SEVERE] at uk.co.tggl.pluckerpluck.multiinv.mysql.SqlConnector.saveInventory(SqlConnector.java:229)
01:15:13 [SEVERE] at uk.co.tggl.pluckerpluck.multiinv.player.MIPlayer.saveInventory(MIPlayer.java:64)
01:15:13 [SEVERE] at uk.co.tggl.pluckerpluck.multiinv.listener.MIPlayerListener.savePlayerState(MIPlayerListener.java:205)
01:15:13 [SEVERE] at uk.co.tggl.pluckerpluck.multiinv.player.DeferredWorldCheck.run(DeferredWorldCheck.java:27)
01:15:13 [SEVERE] at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:126)
01:15:13 [SEVERE] at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:510)
01:15:13 [SEVERE] at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:212)
01:15:13 [SEVERE] at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:474)
01:15:13 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:406)
01:15:13 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)