Mineaurion / AurionVoteListener

GNU General Public License v3.0
2 stars 6 forks source link

Accessing Database on the main thread of minecraft #25

Closed ghost closed 4 years ago

ghost commented 6 years ago

"it's the voting plugin (AurionVoteListener) timing out when trying to access the database on the main thread. the database config might be wrong, or the database is acting weird, or something, but it's blocking the main thread for 30 seconds and so nothing can run during that time. the plugin author should really be doing that stuff async"

"@NikkuMiru Even saving to file, it shouldn't be doing that on the main thread. Report bug to author."

Yann151924 commented 6 years ago

The plugin is currently under rewrite, but where the conversation come from, i'm curious :) ?

ghost commented 6 years ago

From me and a other Guy in the Sponge Discord since i had a problem with it on my server. Cause when i wrote a command for example /sponge i get like 10 warn lines in console from the vote plugin and then i time out

ghost commented 6 years ago

after i reloaded the plugin

Yann151924 commented 6 years ago

I currently make a full rewrite of the plugin so i think the prob will be solved when i finish. Can you upload this log on pastebin, so i can take a look and make a quick fix if i can ?

Yann151924 commented 6 years ago

Log :

12:10:43] [Server thread/INFO] [STDERR]: [com.mineaurion.aurionvotelistener.SQL.SwitchSQL:TotalsVote:56]: java.sql.SQLTransientConnectionException: HikariPool-2 - Connection is not available, request timed out after 30000ms.
[12:10:43] [Server thread/INFO] [STDERR]: [com.mineaurion.aurionvotelistener.SQL.SwitchSQL:TotalsVote:56]:  at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:601)

The prob come from when dbfile is set and reload is launched

Yann151924 commented 4 years ago

Fix in the latest version 2.5.6