-
Notifications
You must be signed in to change notification settings - Fork 0
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
Unable to perform database query. #14
Comments
I think you need to do an automatic reconnection if I understand correctly |
Yep. That's weird that it's not in the plugin |
Lel 😆 |
For now you can just manually reconnect (there's a command for that in case you changed database settings) I'll get to it a few hours, it's a quick fix, just gotta change two lines like this one VoidWhitelist/src/main/java/voidpointer/spigot/voidwhitelist/config/DbmsFactory.java Line 77 in 7cb46fc
|
Just fixed the code, I'm going to run two servers hopefully for about 12 hours — one running old 0.9.1 and the other one running 0.9.2 whitelist, if the issue won't reproduce I'll merge fix and release it. You can download the new 0.9.2 at tag v0.9.2-unstable |
In older version plugin was disabled due to inactivity in mariadb/mysql for testing, you can change mariadb's |
Thanks, I didn't even consider changing mariadb setting lol 🤣 |
hahah, lol |
It seems the problem is still there. Last build
Hmm, if the player tries to reconnect to the server, everything will be fine |
(mariadb commands)
|
So does it fix itself even though it fails for the first time? Weird
|
Yep, that seems to be the case, just tested both versions. I'll look into other methods of fixing it, the most undesirable is to automatically initiate reconnection to the database in case of an error directly in the code, but it would require some architectural changes to codebase to make it look at least decent. What I'm thinking is, perhaps, a connection poll also might fix the issue All in all, I think the current state is satisfactory: retrying to connect or just typing a command for the second time is not a big deal. And as long as there's a player online, the plugin will keep running sync tasks to SQL server every N (30 by default) minutes, which will keep the connection running. |
Fixed with PR #15, release page. There will be no need to reuse the command/reconnect to the server, the plugin will automatically try to reestablish database connection. |
Hello. I discovered a funny thing - if no one joins to the server for a long time (more than 8 hours), then I get this error after players join:
[ForkJoinPool.commonPool-worker-21/WARN]: [VoidWhitelist] Unable to perform a database query: The last packet successfully received from the server was 38,857,955 milliseconds ago. The last packet sent successfully to the server was 38,857,955 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.
I have default mariadb options set.
The text was updated successfully, but these errors were encountered: