Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database connection sometimes times out and should be reconnected #5

Closed
BrainStone opened this issue Apr 24, 2017 · 1 comment
Closed
Assignees
Labels
Milestone

Comments

@BrainStone
Copy link
Member

Issue Description:

After a longer period of time the database connection times out. The plugin should try to reconnect.

What happens:

When the connection times out no database actions happen

What you expected to happen:

That the database connection gets reestablished

Steps to reproduce:

  1. Start server with plugin
  2. Wait a day
  3. Login on server
  4. Watch database requests fail

Affected Versions (Do not use "latest"):

  • Minecraft: 1.11.2
  • InvSync: 0.4.0-beta
  • Sponge: 1.11.2-6.0.0-BETA-243

Your most recent log or stack trace file where the issue was present:

[17:03:55 ERROR] [invsync]: Could not save invetory for player KennyTheKing (2a095566-a563-4207-a747-846f171dd779)
java.sql.SQLException: execute() is called on closed connection
        at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.prolog(AbstractQueryProtocol.java:1239) ~[2017-04-11-18-38-13-spongevanilla-1.11.2-6.0.0-BETA-243.jar:1.11.2-6.0.0-BETA-243]
        at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.prologProxy(AbstractQueryProtocol.java:1223) ~[2017-04-11-18-38-13-spongevanilla-1.11.2-6.0.0-BETA-243.jar:1.11.2-6.0.0-BETA-243]
        at org.mariadb.jdbc.MariaDbServerPreparedStatement.executeQueryProlog(MariaDbServerPreparedStatement.java:332) ~[2017-04-11-18-38-13-spongevanilla-1.11.2-6.0.0-BETA-243.jar:1.11.2-6.0.0-BETA-243]
        at org.mariadb.jdbc.MariaDbServerPreparedStatement.executeInternal(MariaDbServerPreparedStatement.java:390) ~[2017-04-11-18-38-13-spongevanilla-1.11.2-6.0.0-BETA-243.jar:1.11.2-6.0.0-BETA-243]
        at org.mariadb.jdbc.MariaDbServerPreparedStatement.execute(MariaDbServerPreparedStatement.java:359) ~[2017-04-11-18-38-13-spongevanilla-1.11.2-6.0.0-BETA-243.jar:1.11.2-6.0.0-BETA-243]
        at org.mariadb.jdbc.MariaDbServerPreparedStatement.executeUpdate(MariaDbServerPreparedStatement.java:348) ~[2017-04-11-18-38-13-spongevanilla-1.11.2-6.0.0-BETA-243.jar:1.11.2-6.0.0-BETA-243]
        at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61) ~[2017-04-11-18-38-13-spongevanilla-1.11.2-6.0.0-BETA-243.jar:1.11.2-6.0.0-BETA-243]
        at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java) ~[2017-04-11-18-38-13-spongevanilla-1.11.2-6.0.0-BETA-243.jar:1.11.2-6.0.0-BETA-243]
        at world.jnc.invsync.DataSource.saveInventory(DataSource.java:94) [DataSource.class:?]
        at world.jnc.invsync.PlayerEvents.savePlayer(PlayerEvents.java:114) [PlayerEvents.class:?]
        at world.jnc.invsync.PlayerEvents.onPlayerLeave(PlayerEvents.java:53) [PlayerEvents.class:?]
        at org.spongepowered.common.event.listener.DisconnectListener_PlayerEvents_onPlayerLeave34.handle(Unknown Source) [?:?]
        at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:95) [RegisteredListener.class:1.11.2-6.0.0-BETA-243]
        at org.spongepowered.common.event.SpongeEventManager.post(SpongeEventManager.java:305) [SpongeEventManager.class:1.11.2-6.0.0-BETA-243]
        at org.spongepowered.common.event.SpongeEventManager.post(SpongeEventManager.java:319) [SpongeEventManager.class:1.11.2-6.0.0-BETA-243]
        at org.spongepowered.common.SpongeImpl.postEvent(SpongeImpl.java:133) [SpongeImpl.class:1.11.2-6.0.0-BETA-243]
        at net.minecraft.network.NetHandlerPlayServer.redirect$onDisconnectHandler$zgk000(SourceFile:2002) [mi.class:?]
        at net.minecraft.network.NetHandlerPlayServer.func_147231_a(SourceFile:733) [mi.class:?]
        at net.minecraft.network.NetworkManager.func_179293_l(SourceFile:382) [er.class:?]
        at net.minecraft.network.NetworkSystem.func_151269_c(SourceFile:215) [mh.class:?]
        at net.minecraft.server.MinecraftServer.func_71190_q(SourceFile:1603) [MinecraftServer.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(SourceFile:335) [lh.class:?]
        at net.minecraft.server.MinecraftServer.func_71217_p(SourceFile:562) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.run(SourceFile:466) [MinecraftServer.class:?]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
@BrainStone
Copy link
Member Author

The method is not being called!

@BrainStone BrainStone removed the wip label Apr 27, 2017
@BrainStone BrainStone modified the milestone: 1.0.0 May 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant