LuckPerms

LuckPerms

41.4k Downloads

LuckPerms clears all permission settings on reboot

Rafa-s-r opened this issue ยท 5 comments

commented

Description

We have encountered a rather strange bug that happens every 3-4 months. After a scheduled reboot we found that all LuckPerms data has been deleted.

Reproduction steps

It is complicated to reproduce. According to our research it seems that when the database connection is restarted and closed and just at that moment a user tries to log in there is a thread that tries to make a query and fails.

image

Expected behaviour

Do not delete the entire configuration.

Environment details

Server ForgeSponge with Minecraft 1.12.2
LuckPerms version 5.1.17

Any other relevant details

I think it must be some kind of thread synchronisation problem or something weird like that. In the image I posted before you can see how the connection closes and just at that moment a user tries to enter and from then on it fails. This is not something that happens often and luckily we constantly make backups but it could be a problem.

commented

You are using a dated version of the plugin, you should probably upgrade and see if the issue persists.

commented

We have already updated and the problem remains. What's more, it happens more frequently now.

commented

Did your server crash or you forcefully shut it down before?

commented

Things I can think of:

  1. Ensure your server has plenty of free disk space
  2. Ensure that when the server shuts down, it does so gracefully (doesn't force exit)
  3. Ensure that only one server is being ran in a given directory at a time

Failing that, it might be worth switching from H2 to a remote database like MySQL. There's a guide on the wiki that explains how to do this :)

commented

No, the server did not crash when it was restarted.

We were using H2 storage, switched to MySQL and so far it hasn't been a problem.
I suppose it is possible that with servers with many users without MySQL it is possible for H2 to fail.