LuckPerms

LuckPerms

41.4k Downloads

Failed to validate connection

MithrandirCraft opened this issue ยท 8 comments

commented

I'm having some issues with the LP <-> MariaDB connection
[13:50:18 WARN]: luckperms - Failed to validate connection me.lucko.luckperms.lib.mariadb.MariaDbConnection@40616e7f (Connection.setNetworkTimeout cannot be called on a closed connection)
Checked the LP wiki and found that a certain threshold should be lower than the database's, and it actually is. Any ideas?
Happened after switching hosts.

LP: 4.2.22
Spigot: 1.12.2

commented

Same here, all above didn't work out.

commented

Lowered maximum-lifetime from 1800000 to half the ammount: 900000
Will report if the error persists, allthough it does spam quite constantly and usually if any changes to permissions are done.

commented

Try lowering the value in the LP config.

commented

@lucko Then I'm sentenced.
Did you propperly read what I wrote? I already checked that section of the wiki and verified I'm complying with it. It happens even after. I have full control of the database so if that where the case I could fix it.

Also I lowered the value anyway to half, and the errors won't stop.

lp cfg (15 min timeout):
screenshot_2
mariadb (480h timeout):
screenshot_1

I think it's obvious it's way below.

If there are no other ideas please just say so.

commented

Yes I did read what you said - what makes you think I didn't?

All the info I can give relating to this issue is here

That statement is still correct - the issue you're experiencing is not being caused by or at all related to LuckPerms - as explained at the top of the "Storage system errors" wiki page.

Importantly:

  • If the error originates from the driver - it is not being caused by LuckPerms.
  • You may have experienced a bug in the driver itself, however this is unlikely
  • The most likely cause is that something is setup or configured incorrectly.

The wiki page contains some common configuration mistakes, alongside my own research about how they can be resolved.

If changing the configuration values didn't help fix the problem, then you'll have to look around for other potential causes. Perhaps some other system is closing the connections early, might be a networking issue? Maybe the MySQL wait_timeout setting is being overridden by something else? Maybe it needs a restart to be applied?

Unfortunately all I can offer you is guesses. MySQL isn't my software, and I'm not an expert on the way the MySQL server operates.

commented

@MithrandirCraft MariaDB has 3 configs to check for when looking at these values.

Also it's 480min not 480h. Another value to check is interactive_timeout.
One more thing that could easily cause this if the MariaDB server is on a different host. Then the connections could be killed by the routing hardware between the two for inactivity.
Lowering the value in LP down to a minute is still fine.

commented

I lowered to 5 min, the errors stopped happening, but the whole network crashes once a day around 2:00 A.M.

I'm not a pro at mariadb, I wonder if I'm overseeing something or have missconfigured anything.
All I did was install mariadb on a new host, export all my tables from my old server and later import them to this newly installed mariadb. Then I created a user specifically for plugins to use @ localhost, which has all permissions.
Both sql and servers are on the same machine.
I recently made max connections higher, from 100 to 300. This doesn't steem to stop the crashes allthough there are far less errors since I did all these tweaks. That's basically all I did, could I be missing something? How would you guys set it up?