Stargate Rewritten

Stargate Rewritten

241 Downloads

Stacktrace after creating a multiple of portals

Thorinwasher opened this issue ยท 1 comments

commented
[13:55:33 ERROR]:               java.base@16.0.1/jdk.internal.misc.Unsafe.park(Native Method)
[13:55:33 ERROR]:               java.base@16.0.1/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:252)
[13:55:33 ERROR]:               java.base@16.0.1/java.util.concurrent.SynchronousQueue$TransferQueue.awaitFulfill(SynchronousQueue.java:761)
[13:55:33 ERROR]:               java.base@16.0.1/java.util.concurrent.SynchronousQueue$TransferQueue.transfer(SynchronousQueue.java:689)
[13:55:33 ERROR]:               java.base@16.0.1/java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:937)
[13:55:33 ERROR]:               Stargate-1.0.0.3-ALPHA.jar//com.zaxxer.hikari.util.ConcurrentBag.borrow(ConcurrentBag.java:151)
[13:55:33 ERROR]:               Stargate-1.0.0.3-ALPHA.jar//com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:180)
[13:55:33 ERROR]:               Stargate-1.0.0.3-ALPHA.jar//com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:162)
[13:55:33 ERROR]:               Stargate-1.0.0.3-ALPHA.jar//com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:100)
[13:55:33 ERROR]:               Stargate-1.0.0.3-ALPHA.jar//net.TheDgtl.Stargate.database.MySqlDatabase.getConnection(MySqlDatabase.java:68)
[13:55:33 ERROR]:               Stargate-1.0.0.3-ALPHA.jar//net.TheDgtl.Stargate.database.PortalDatabaseAPI.removePortalFromStorage(PortalDatabaseAPI.java:192)
[13:55:33 ERROR]:               Stargate-1.0.0.3-ALPHA.jar//net.TheDgtl.Stargate.network.StargateRegistry.removePortal(StargateRegistry.java:55)
[13:55:33 ERROR]:               Stargate-1.0.0.3-ALPHA.jar//net.TheDgtl.Stargate.network.LocalNetwork.removePortal(LocalNetwork.java:83)
[13:55:33 ERROR]:               Stargate-1.0.0.3-ALPHA.jar//net.TheDgtl.Stargate.network.portal.AbstractPortal.destroy(AbstractPortal.java:337)
[13:55:33 ERROR]:               Stargate-1.0.0.3-ALPHA.jar//net.TheDgtl.Stargate.listeners.BlockEventListener.lambda$0(BlockEventListener.java:67)
[13:55:33 ERROR]:               Stargate-1.0.0.3-ALPHA.jar//net.TheDgtl.Stargate.listeners.BlockEventListener$$Lambda$6431/0x0000000801d94ca0.get(Unknown Source)
[13:55:33 ERROR]:               Stargate-1.0.0.3-ALPHA.jar//net.TheDgtl.Stargate.action.SupplierAction.run(SupplierAction.java:24)
[13:55:33 ERROR]:               Stargate-1.0.0.3-ALPHA.jar//net.TheDgtl.Stargate.thread.SynchronousPopulator.cycleQueue(SynchronousPopulator.java:105)
[13:55:33 ERROR]:               Stargate-1.0.0.3-ALPHA.jar//net.TheDgtl.Stargate.thread.SynchronousPopulator.cycleQueues(SynchronousPopulator.java:79)
[13:55:33 ERROR]:               Stargate-1.0.0.3-ALPHA.jar//net.TheDgtl.Stargate.thread.SynchronousPopulator.run(SynchronousPopulator.java:38)
[13:55:33 ERROR]:               app//org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:101)
[13:55:33 ERROR]:               app//org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483)
[13:55:33 ERROR]:               app//net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1567)
[13:55:33 ERROR]:               app//net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:490)
[13:55:33 ERROR]:               app//net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1483)
[13:55:33 ERROR]:               app//net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1282)
[13:55:33 ERROR]:               app//net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319)
[13:55:33 ERROR]:               app//net.minecraft.server.MinecraftServer$$Lambda$3703/0x00000008013cd238.run(Unknown Source)
[13:55:33 ERROR]:               java.base@16.0.1/java.lang.Thread.run(Thread.java:831)

The reason for this is probably

java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30001ms.
[14:02:26 WARN]:        at Stargate-1.0.0.3-ALPHA.jar//com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:696)
[14:02:26 WARN]:        at Stargate-1.0.0.3-ALPHA.jar//com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:197)
[14:02:26 WARN]:        at Stargate-1.0.0.3-ALPHA.jar//com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:162)
[14:02:26 WARN]:        at Stargate-1.0.0.3-ALPHA.jar//com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:100)
[14:02:26 WARN]:        at Stargate-1.0.0.3-ALPHA.jar//net.TheDgtl.Stargate.database.MySqlDatabase.getConnection(MySqlDatabase.java:68)
[14:02:26 WARN]:        at Stargate-1.0.0.3-ALPHA.jar//net.TheDgtl.Stargate.database.PortalDatabaseAPI.savePortalToStorage(PortalDatabaseAPI.java:156)
[14:02:26 WARN]:        at Stargate-1.0.0.3-ALPHA.jar//net.TheDgtl.Stargate.network.StargateRegistry.savePortal(StargateRegistry.java:60)
[14:02:26 WARN]:        at Stargate-1.0.0.3-ALPHA.jar//net.TheDgtl.Stargate.network.LocalNetwork.savePortal(LocalNetwork.java:169)
[14:02:26 WARN]:        at Stargate-1.0.0.3-ALPHA.jar//net.TheDgtl.Stargate.network.LocalNetwork.addPortal(LocalNetwork.java:98)
[14:02:26 WARN]:        at Stargate-1.0.0.3-ALPHA.jar//net.TheDgtl.Stargate.listeners.BlockEventListener.tryPortalCreation(BlockEventListener.java:266)
[14:02:26 WARN]:        at Stargate-1.0.0.3-ALPHA.jar//net.TheDgtl.Stargate.listeners.BlockEventListener.onSignChange(BlockEventListener.java:191)
[14:02:26 WARN]:        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor28.execute(Unknown Source)
[14:02:26 WARN]:        at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69)
[14:02:26 WARN]:        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80)
[14:02:26 WARN]:        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[14:02:26 WARN]:        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628)
[14:02:26 WARN]:        at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:3060)
[14:02:26 WARN]:        at net.minecraft.server.network.PlayerConnection.lambda$handleSignUpdate$20(PlayerConnection.java:3008)
[14:02:26 WARN]:        at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:474)
[14:02:26 WARN]:        at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:714)
[14:02:26 WARN]:        at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
[14:02:26 WARN]:        at net.minecraft.server.TickTask.run(TickTask.java:18)
[14:02:26 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:149)
[14:02:26 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.executeTask(IAsyncTaskHandlerReentrant.java:23)
[14:02:26 WARN]:        at net.minecraft.server.MinecraftServer.executeTask(MinecraftServer.java:1426)
[14:02:26 WARN]:        at net.minecraft.server.MinecraftServer.executeTask(MinecraftServer.java:192)
[14:02:26 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:122)
[14:02:26 WARN]:        at net.minecraft.server.MinecraftServer.bf(MinecraftServer.java:1404)
[14:02:26 WARN]:        at net.minecraft.server.MinecraftServer.executeNext(MinecraftServer.java:1397)
[14:02:26 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:132)
[14:02:26 WARN]:        at net.minecraft.server.MinecraftServer.sleepForTick(MinecraftServer.java:1375)
[14:02:26 WARN]:        at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1286)
[14:02:26 WARN]:        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319)
[14:02:26 WARN]:        at java.base/java.lang.Thread.run(Thread.java:831)
commented

After some testing, this seems to be fixed.

This comes from connections not being closed:

  • Note that hikaricp is a connectionmanager that is meant to manage multiple connections simultaneously. For that to work we have to close the connection; this does not cause any performance drop, as it's not closing a real connection