Adding new server to the pool has a lot of errors first startup
Maescool opened this issue ยท 3 comments
Since 5.8.0
I run servers based on images (docker)
So, when I add a fresh server to my pool I get these errors:
[13:27:19 WARN]: java.lang.IllegalStateException: Could not get next result for class me.confuser.banmanager.data.IpBanData
[13:27:19 WARN]: at me.confuser.banmanager.internal.ormlite.stmt.SelectIterator.next(SelectIterator.java:183)
[13:27:19 WARN]: at me.confuser.banmanager.runnables.IpSync.newBans(IpSync.java:39)
[13:27:19 WARN]: at me.confuser.banmanager.runnables.IpSync.run(IpSync.java:26)
[13:27:19 WARN]: at me.confuser.banmanager.runnables.Runner.run(Runner.java:28)
[13:27:19 WARN]: at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71)
[13:27:19 WARN]: at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
[13:27:19 WARN]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[13:27:19 WARN]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[13:27:19 WARN]: at java.lang.Thread.run(Thread.java:745)
[13:27:19 WARN]: Caused by: java.sql.SQLTransientConnectionException: HikariPool-0 - Connection is not available, request timed out after 30000ms.
[13:27:19 WARN]: at me.confuser.banmanager.internal.hikari.pool.HikariPool.getConnection(HikariPool.java:195)
[13:27:19 WARN]: at me.confuser.banmanager.internal.hikari.pool.HikariPool.getConnection(HikariPool.java:147)
[13:27:19 WARN]: at me.confuser.banmanager.internal.hikari.HikariDataSource.getConnection(HikariDataSource.java:99)
[13:27:19 WARN]: at me.confuser.banmanager.internal.ormlite.jdbc.DataSourceConnectionSource.getReadWriteConnection(DataSourceConnectionSource.java:120)
[13:27:19 WARN]: at me.confuser.banmanager.internal.ormlite.jdbc.DataSourceConnectionSource.getReadOnlyConnection(DataSourceConnectionSource.java:102)
[13:27:19 WARN]: at me.confuser.banmanager.internal.ormlite.field.FieldType.assignField(FieldType.java:555)
[13:27:19 WARN]: at me.confuser.banmanager.internal.ormlite.stmt.mapped.BaseMappedQuery.mapRow(BaseMappedQuery.java:71)
[13:27:19 WARN]: at me.confuser.banmanager.internal.ormlite.stmt.SelectIterator.getCurrent(SelectIterator.java:270)
[13:27:19 WARN]: at me.confuser.banmanager.internal.ormlite.stmt.SelectIterator.nextThrow(SelectIterator.java:161)
[13:27:19 WARN]: at me.confuser.banmanager.internal.ormlite.stmt.SelectIterator.next(SelectIterator.java:173)
[13:27:19 WARN]: ... 8 more
this is just a snippet, spams console with simmular errors, so this was IPBanData, but throws it also for the rest..
stops after a minute..
When i restart, all is fine..
Fresh server has a schedules.yml with 0 on the last checked values.. my guess something wrong there?
Could you elaborate a little more about your setup?
The issue in the exception is that the connection to the database has dropped and it wasn't able to reconnect successfully. It disappears after a minute probably because it has successfully reconnected to the database at that point.
Other plugins don't seem to have issues connecting to the sql db's
The only special thing in the config that is different to servers that have run with this plugin
is the schedules.yml times set to 0
maybe the query reacting to slow? cause i do have a couple of bans/mutes in the db..
Which part is set to 0? If it's last checked, that's normal, it means it'll automatically sync everything on start up.
Other plugins may not be executing queries as often as BM is, therefore you may not notice it, or they may not be handling connection timeouts by displaying a stack trace.
This isn't an issue with the plugin itself, BM makes use of connection pooling alongside auto reconnect. Look into why when you deploy a new server the connection to the database timesout.