Spigot Regionerator 2.3.0

Gradual deletion of unvisited terrain

  1. Code (Java):
    16.04 10:04:35 [Server] ERROR ------------------------------
    16.04 10:04:35 [Server] ERROR The server has stopped responding! This is (probably) not a Paper bug.
    16.04 10:04:35 [Server] ERROR If you see a plugin in the Server thread dump below, then please report it to that author
    16.04 10:04:35 [Server] ERROR *Especially* if it looks like HTTP or MySQL operations are occurring
    16.04 10:04:35 [Server] ERROR If you see a world save or edit, then it means you did far more than your server can handle at once
    16.04 10:04:35 [Server] ERROR If this is the case, consider increasing timeout-time in spigot.yml but note that this will replace the crash with LARGE lag spikes
    16.04 10:04:35 [Server] ERROR If you are unsure or still think this is a Paper bug, please report this to https://github.com/PaperMC/Paper/issues
    16.04 10:04:35 [Server] ERROR Be sure to include ALL relevant console errors and Minecraft crash reports
    16.04 10:04:35 [Server] ERROR Paper version: git-Paper-184 (MC: 1.15.2)
    16.04 10:04:35 [Server] ERROR ------------------------------
    16.04 10:04:35 [Server] ERROR Server thread dump (Look for plugins here before reporting to Paper!):
    16.04 10:04:35 [Server] ERROR ------------------------------
    16.04 10:04:35 [Server] ERROR Current Thread: Server thread
    16.04 10:04:35 [Server] ERROR PID: 23 | Suspended: false | Native: true | State: RUNNABLE
    16.04 10:04:35 [Server] ERROR Stack:
    16.04 10:04:35 [Server] ERROR org.sqlite.core.NativeDB.step(Native Method)
    16.04 10:04:35 [Server] ERROR org.sqlite.core.DB.exec(DB.java:170)
    16.04 10:04:35 [Server] ERROR org.sqlite.SQLiteConnection.commit(SQLiteConnection.java:404)
    16.04 10:04:35 [Server] ERROR com.github.jikoo.regionerator.ChunkFlagger.lambda$new$2(ChunkFlagger.java:96)
    16.04 10:04:36 [Server] ERROR com.github.jikoo.regionerator.ChunkFlagger$$Lambda$4417/605749256.accept(Unknown Source)
    16.04 10:04:36 [Server] ERROR com.github.jikoo.regionerator.util.BatchExpirationLoadingCache.expireAll(BatchExpirationLoadingCache.java:164)
    16.04 10:04:36 [Server] ERROR com.github.jikoo.regionerator.ChunkFlagger.save(ChunkFlagger.java:262)
    16.04 10:04:36 [Server] ERROR com.github.jikoo.regionerator.Regionerator.onDisable(Regionerator.java:291)
    16.04 10:04:36 [Server] ERROR org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:265)
    16.04 10:04:36 [Server] ERROR org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:395)
    16.04 10:04:36 [Server] ERROR org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:516)
    16.04 10:04:36 [Server] ERROR org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:502)
    16.04 10:04:36 [Server] ERROR org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:495)
    16.04 10:04:36 [Server] ERROR org.bukkit.craftbukkit.v1_15_R1.CraftServer.disablePlugins(CraftServer.java:404)
    16.04 10:04:36 [Server] ERROR net.minecraft.server.v1_15_R1.MinecraftServer.stop(MinecraftServer.java:747)
     
     
  2. I need more information to go on, unfortunately. Did you just upgrade from a non-SQLite version? If so, what was server uptime? If not, need your config and an approximate number of players that were on.
     
  3. I always used SQLite, my server has a maximum of 6 players, this error happens when I close the server.
     
  4. What're your settings for flagging? Does this happen every time?
    Edit: if it's replicable, please check /regionerator cache before shutting down.
     
    #344 Jikoo, Apr 16, 2020
    Last edited: Apr 16, 2020
  5. Code (Java):
    16.04 11:48:12 [Server] INFO Cached chunk values: 1992
    16.04 11:48:12 [Server] INFO Queued saves: 0
    Code (YAML):
    chunk-flag-radius: 4
    seconds-per-flag
    : 10
    minutes-per-flag-autosave
    : 5
    days-till-flag-expires
    : 7
     
  6. Frankly, I've got nothing. The fact that there are no queued saves means there's nothing actively being expired, meaning the db should not be locked. There's no reason to be hanging on commit. I've found a couple more ways to optimize things, but your issue is happening with such a small number of flags that I don't see it helping.
    If you would, please get me the full startup and shutdown logs - there has to be something else at play here.

    Edit: Actually, had another idea, will test. Hooray databases. No dice, still need logs.
     
  7. Jikoo updated Regionerator with a new update entry:

    2.0.0 release

    Read the rest of this update entry...

    I know I said I wanted to add a separate log for any DB-related errors, but it turned out to be so much of a hassle that it wasn't worth the time. You can do this on your end pretty simply if desired using your log4j2 configuration.
     
  8. Does it still works on 1.12.2?
     
  9. Internally Regionerator theoretically supports versions back to 1.8 and below, but 1.12 is pretty old. Try it out, if the version of the protection plugin you're using isn't supported you'll have to downgrade until you find a version that works.
     
  10. The thing is I get this error on startup....

    Code (Text):
    [09:41:23 INFO]: [Regionerator] Enabling Regionerator v2.0.1
    [09:41:23 INFO]: [Regionerator] Debug level: LOW
    [09:41:23 ERROR]: Error occurred while enabling Regionerator v2.0.1 (Is it up to date?)
    java.lang.RuntimeException: An error occurred while setting up the database
    at com.github.jikoo.regionerator.ChunkFlagger.<init>(ChunkFlagger.java:53) ~[?:?]
    at com.github.jikoo.regionerator.Regionerator.onEnable(Regionerator.java:47) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[patched_1.12.2.jar:git-Paper-1618]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:316) ~[patched_1.12.2.jar:git-Paper-1618]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) ~[patched_1.12.2.jar:git-Paper-1618]
    at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin(CraftServer.java:395) ~[patched_1.12.2.jar:git-Paper-1618]
    at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins(CraftServer.java:344) ~[patched_1.12.2.jar:git-Paper-1618]
    at net.minecraft.server.v1_12_R1.MinecraftServer.t(MinecraftServer.java:442) ~[patched_1.12.2.jar:git-Paper-1618]
    at net.minecraft.server.v1_12_R1.MinecraftServer.l(MinecraftServer.java:403) ~[patched_1.12.2.jar:git-Paper-1618]
    at net.minecraft.server.v1_12_R1.MinecraftServer.a(MinecraftServer.java:341) ~[patched_1.12.2.jar:git-Paper-1618]
    at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:289) ~[patched_1.12.2.jar:git-Paper-1618]
    at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:616) ~[patched_1.12.2.jar:git-Paper-1618]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
    Caused by: org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (near "ON": syntax error)
    at org.sqlite.core.DB.newSQLException(DB.java:909) ~[patched_1.12.2.jar:git-Paper-1618]
    at org.sqlite.core.DB.newSQLException(DB.java:921) ~[patched_1.12.2.jar:git-Paper-1618]
    at org.sqlite.core.DB.throwex(DB.java:886) ~[patched_1.12.2.jar:git-Paper-1618]
    at org.sqlite.core.NativeDB._exec_utf8(Native Method) ~[patched_1.12.2.jar:git-Paper-1618]
    at org.sqlite.core.NativeDB._exec(NativeDB.java:87) ~[patched_1.12.2.jar:git-Paper-1618]
    at org.sqlite.jdbc3.JDBC3Statement.executeUpdate(JDBC3Statement.java:116) ~[patched_1.12.2.jar:git-Paper-1618]
    at com.github.jikoo.regionerator.ChunkFlagger.<init>(ChunkFlagger.java:43) ~[?:?]
    ... 12 more
    [09:41:23 INFO]: [Regionerator] Disabling Regionerator v2.0.1
     
  11. Looks like the version of SQLite included in 1.12 is so old that it doesn't support triggers. I can't really recommend using older versions of Regionerator for obvious reasons, but since your server is so outdated you'll have to if you want to run it.
     
  12. I already thought something like that... too bad for me xD.
    My problem is that I must stay on this version because Feudal isn't good on 1.15 xd


    But really strange... i use over 40 plugins and now one has a problem with SQLite
     
  13. CouldnĀ“t you try to support the SQL thing in 1.12.2 again?
    Would be really nice
     
  14. I get that the plugin you want to use to provide the experience you're looking for on your server locks you into your software selection, but this is an additional side effect of making that choice. To replace the trigger would require me to at minimum double my interactions with the database and increase code complexity by quite a bit. I am not interested in adding a performance or quality hit like that, nor am I willing to devote my time to maintaining separate versions for outdated server software.

    As far as your options go:
    • Update the version of SQLite your server includes. Simple and unlikely to break plugins.
    • Maintain your own fork of Regionerator. Either break the feature or rewrite deleting database data to mimic the trigger.
    • Use outdated Regionerator. Old flaws and larger footprint.
    • Don't use Regionerator. Not sure how alternatives look these days, I haven't checked for something similar since Regionerator's predecessor was pulled from Spigot.
     
  15. Hhmm I think we will update soon to 1.15
     
  16. LoneDev

    Benefactor

    Hello @Jikoo sorry for bothering!
    Can you edit the plugin so that hours-between-cycles will work even when server is restarted?
    I mean, you can save the "last run" epoch to be able to calculate the nextRun on plugin restart, because I want to set the deletion on each 7 days not everyday.

    Thanks!
     
    • Agree Agree x 1
  17. Doable, yeah. Can't promise soon due to the number of fires I'm dealing with currently, but I can add that to my list.
     
    • Friendly Friendly x 1
  18. Hello, maybe there is a command that forces you to remove chunks immediately?
    something like that would be useful
     
  19. Forcing a cycle run? Since cycles start on plugin load if a world is ready, you should be able to force a run by reloading the plugin with /regionerator reload.