SQL Error
Closed this issue ยท 21 comments
Hello, we run MariaDB with latest build of Luckperms.
When we start the server, everything is okay, but around 18 hours, it started being very very very strange. Luckperms disconnected from our database and didn't connect again... It tells things about maxLifetime or timeout things. We already tried to change values multiple times, we already multiple times asked on your discord server, but nobody couldn't really help us....
The error: https://pastebin.com/YfnkU6re
Thanks, Larkyy.
And please, don't send me the help page with the database error, I saw it like 10 times :)
Could you also provide us with additional information like your server version and type (Latest won't be a valid version), what plugins you use and your LP config (Please remove username and password for security reasons)
Oh sure, and also sorry.
Server version: Paperspigot 1.12.2
Luckperms version: Bungee-5.0.116, Bukkit-5.0.116
I use around 92 plugins and it is a network, so...
LP config without logins into database (Spigot server): https://pastebin.com/WjLx40jb
MariaDB my.cnf: https://pastebin.com/YZyiHtXy
I have the same exact problem as the poster, we read the wiki and tried many different values for the configs on lp and mysql and nothing works, everything is fine at fist and then after 10 hours of less errors start happening leading to crash.
This is what i am using : 1800000 for LP, 28800 for MySQL/MariaDB
Waterfall : build 327
MC Servers: Paper 161 and Tuinity 39
Luckperms : 116
Can you try setting the maximum-lifetime
to a lower value? Cut it in half, if that doesnt work, cut it in half again. Also you might want to set the messaging-service
to sql
instead of pluginmsg
Edit:
Oh, rather try de-creasing the maximum-pool-size back to 10
Can you try setting the
maximum-lifetime
to a lower value? Cut it in half, if that doesnt work, cut it in half again. Also you might want to set themessaging-service
tosql
instead ofpluginmsg
I already tried to change the value of maximum-lifetime and also some values in the config of MariaDB. But thanks for the information about messaging, I will try it.
Maybe you can try to set the maximum-pool-size
back to 10? or try increasing the minimum-idle
to the same value as maximum-pool-size
Maybe you can try to set the
maximum-pool-size
back to 10? or try increasing theminimum-idle
to the same value asmaximum-pool-size
We had this value only on Skyblock server which didn't even drop. (Only Hub and Bungee dropped now)
That maybe is your problem, every one of that server opens multible connections to the database, and somewhen the limit is exceeded and the Database wont accept more connections. You could try to increase the maximum simultanious connections of your database server.
you need to add these variables to your mysql config to do that:
max_connections = 3000
max_user_connections=1000
That allows the database to accept 3k simultanious connections, but limiting the maximum connections per user to 1k. It should look simelar to this in your mysql config afterwards:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
max_connections = 3000
max_user_connections=1000
That maybe is your problem, every one of that server opens multible connections to the database, and somewhen the limit is exceeded and the Database wont accept more connections. You could try to increase the maximum simultanious connections of your database server.
you need to add these variables to your mysql config to do that:
max_connections = 3000 max_user_connections=1000
That allows the database to accept 3k simultanious connections, but limiting the maximum connections per user to 1k. It should look simelar to this in your mysql config afterwards:
[mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql max_connections = 3000 max_user_connections=1000
I Will try it tomorrow, I had to go. Also thank you very much for helping me with the issue. :)
That maybe is your problem, every one of that server opens multible connections to the database, and somewhen the limit is exceeded and the Database wont accept more connections. You could try to increase the maximum simultanious connections of your database server.
you need to add these variables to your mysql config to do that:
max_connections = 3000 max_user_connections=1000
That allows the database to accept 3k simultanious connections, but limiting the maximum connections per user to 1k. It should look simelar to this in your mysql config afterwards:
[mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql max_connections = 3000 max_user_connections=1000
btw I have a little info for you... The server wasn't released yet and only me was online... So there wasn't a lot of connections :/
That isnt relevant here, LuckPerms still opens multible connections at startup, opening them when users join would slow down the process
That isnt relevant here, LuckPerms still opens multible connections at startup, opening them when users join would slow down the process
Also would I change the messaging system from pluginmsg to SQL? And what would it change?
The messaging system is basically what informs the other servers about changes so that they re-sync the permissions. Setting it to SQL is the best option to avoid possible sync errors
The messaging system is basically what informs the other servers about changes so that they re-sync the permissions. Setting it to SQL is the best option to avoid possible sync errors
In addition does pluginmsg
require the Bungee version of LP to be installed too, which not everyone wants. This is also limited to servers that contain players, due to the nature of plugin messaging requiring this.
sql isn't affected by either of those things.
This is btw explained in the comments above the config-option (not 1:1 tho)
https://github.com/lucko/LuckPerms/blob/2ed45c92a6a55ada6d9c1e50a0082b1b15fa5d66/bukkit/src/main/resources/config.yml#L215-L220
That maybe is your problem, every one of that server opens multible connections to the database, and somewhen the limit is exceeded and the Database wont accept more connections. You could try to increase the maximum simultanious connections of your database server.
you need to add these variables to your mysql config to do that:
max_connections = 3000 max_user_connections=1000
That allows the database to accept 3k simultanious connections, but limiting the maximum connections per user to 1k. It should look simelar to this in your mysql config afterwards:
[mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql max_connections = 3000 max_user_connections=1000
Okay I tried to look into our mysql configuration, and there isn't anything like max-user-connections. Also the max-connections value was already set to 3000.
Then add it to your my.cnf
https://dev.mysql.com/doc/refman/8.0/en/user-resources.html
Not helpful at all, but maybe relevant: https://github.com/lucko/LuckPerms/wiki/Storage-system-errors
There's a very limited amount of things I can practically do to help (sorry!) - it's just a case of tweaking your configurations - although I can see you're trying that already. :)
Not helpful at all, but maybe relevant: https://github.com/lucko/LuckPerms/wiki/Storage-system-errors
There's a very limited amount of things I can practically do to help (sorry!) - it's just a case of tweaking your configurations - although I can see you're trying that already. :)
Hello lucko, thanks for you reply. I think we maybe fixed it, but I don't know that 100%. We changed our database host and it works good now ^^. So let's see how would it go next X hours/days.
- Thanks, Larkyy.
Ok cool! I'll close for now then, feel free to re-open if you've got any more info to give. :)
Hello, I would like to reopen the issue, bcs luckperms sent the error again... We tried to change all values typed at https://github.com/lucko/LuckPerms/wiki/Storage-system-errors.
And it still doesn't work :/
Not helpful at all, but maybe relevant: https://github.com/lucko/LuckPerms/wiki/Storage-system-errors
There's a very limited amount of things I can practically do to help (sorry!) - it's just a case of tweaking your configurations - although I can see you're trying that already. :)
I already saw this website multiple times... I tried everything from there and it still doesn't work. We changed few Hostings and it is still dropping from any reason. The server runs for example for 18 hours and then it drops bcs of MySQL. It worked really well before and without any issues... Then we updated LuckPerms and it started dropping.
Thanks for your answear,
- MrLarkyy_