Zedd7 / ZHorse

Bukkit plugin providing an enhanced management of horses in Minecraft
https://www.spigotmc.org/resources/zhorse.3384/
Other
11 stars 12 forks source link

Console issue and lag #116

Closed Strangehadron closed 5 years ago

Strangehadron commented 5 years ago

Bug report

What are you trying to do ?

Nothing spécial, got some lag and console spam every evening on my server since one weeks. Have not done anything special or change anything in the server. When this happen, the server lag and crash When i perform a timings at the time of the "error", i see that : https://imgur.com/bp0DRjC

Console output

https://pastebin.com/C5GA8ctp

Environment specifications

Thanks for your help !

Zedd7 commented 5 years ago

Is it the complete stacktrace ? It seems to be missing some part. Also, are you sure that you updated nothing ? Maybe Java, Paper, Vault or something on your machine ? Can you think of any reason of why it happens in the evening ?

Strangehadron commented 5 years ago

Nop, i've not change any settings, or add any plugin for a while or even update paper or vault (vault is on the last version since it's out)

Honestly I don't know, I will disable my plugins one by one to see if one of them could led to this.

Here is the screen of the console https://imgur.com/a/D5brjAd and this message repeat two times or three when it appear. Don't know if the lag is the culprit and led to this or if it's lag because of this. :x

Zedd7 commented 5 years ago

Could you upload the entire log file of a run session of your server ?

Strangehadron commented 5 years ago

Yup, can i pm you somewhere the entire log ?

Zedd7 commented 5 years ago

Sure, look for 'Z3dd7' on Spigot and you should find me.

Strangehadron commented 5 years ago

Thanks, just pm you !

Zedd7 commented 5 years ago

I checked your logs and tried to reproduce the issue with both SQLite and MySQL but it worked fine for me, even when forcing the server to load/unload a lot of chunks full of registered horses (which is the context of your issue, at least in the logs you provided).

As it is not a regular crash but instead a freeze of the server's main thread, I opened a topic on Spigot's forum : https://www.spigotmc.org/threads/server-thread-freezing-on-sqlite-querry.367182/

Zedd7 commented 5 years ago

In case you are not following the Spigot's thread, do you use the default and local plugins/ZHorse/zhorse.db file as SQLite database ? Could you also PM me a copy of this file ?

Strangehadron commented 5 years ago

Hey, I've just red it ! Yes, I use the default SQLite db, I've tried MySQL but it never worked for me (error on creation of tables). Just PM you the file !

Zedd7 commented 5 years ago

Hey, sorry for the delay I was quite busy lately.

So, if your zhorse.db file is located in the same location as your server is, there shouldn't be any reason for those long freezes. I also thoroughly tested your db on two different servers (one being the closest possible to yours) and I couldn't find anything wrong with the file. I could even export the data to mysql/mariadb and import them back to sqlite without any trouble.

Unfortunately, I have no idea of what is causing those freezes nor can I tell if it comes from ZHorse or your installation. As some Spigot users pointed out ZHorse could be improved, in particular regarding data fetching efficiency, but there is a 1% chance that it would solve your issue.

Thus, I recommend that you try mysql (or mariadb, to your liking) one more time. All you have to do is :

  1. Install and start a mysql/mariadb server
  2. Create a database/schema zhorse
  3. Edit ZHorse's config.yml file to fill the options for mysql (user, password, db name, etc.) and set mysql as your db type.
  4. Log in and type /zh admin import sqlite which will import your sqlite data into your current database (here mysql). More details here : https://github.com/Zedd7/ZHorse/wiki/Tips-&-tricks#how-to-use-zh-admin-import-

I tag this issue as wontfix but do not hesitate to reply on it if you have updates ;)