CRASH SERVER - Reward 50$ for who can help me!

Discussion in 'Performance Tweaking' started by wydgabriel, Jun 24, 2018.

Thread Status:
Not open for further replies.
  1. [14:24:55] [Spigot Watchdog Thread/ERROR]: Please report this to
    [14:24:55] [Spigot Watchdog Thread/ERROR]: Be sure to include ALL relevant console errors and Minecraft crash reports
    [14:24:55] [Spigot Watchdog Thread/ERROR]: Spigot version: git-Spigot-21fe707-e1ebe52 (MC: 1.8.8)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: ------------------------------
    [14:24:55] [Spigot Watchdog Thread/ERROR]: Server thread dump (Look for plugins here before reporting to Spigot!):
    [14:24:55] [Spigot Watchdog Thread/ERROR]: ------------------------------
    [14:24:55] [Spigot Watchdog Thread/ERROR]: Current Thread: Server thread
    [14:24:55] [Spigot Watchdog Thread/ERROR]: PID: 18 | Suspended: false | Native: false | State: TIMED_WAITING
    [14:24:55] [Spigot Watchdog Thread/ERROR]: Stack:
    [14:24:55] [Spigot Watchdog Thread/ERROR]: java.lang.Thread.sleep(Native Method)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: com.mojang.authlib.yggdrasil.YggdrasilGameProfileRepository.findProfilesByNames(
    [14:24:55] [Spigot Watchdog Thread/ERROR]: net.minecraft.server.v1_8_R3.UserCache.a(
    [14:24:55] [Spigot Watchdog Thread/ERROR]: net.minecraft.server.v1_8_R3.UserCache.getProfile(
    [14:24:55] [Spigot Watchdog Thread/ERROR]: org.bukkit.craftbukkit.v1_8_R3.CraftServer.getOfflinePlayer(
    [14:24:55] [Spigot Watchdog Thread/ERROR]: org.bukkit.Bukkit.getOfflinePlayer(
    [14:24:55] [Spigot Watchdog Thread/ERROR]: wolfe.rocketgrid.Ranking.RankingInv.openRankTop(
    [14:24:55] [Spigot Watchdog Thread/ERROR]: wolfe.rocketgrid.Rankup.RankInvClick.onClick(
    [14:24:55] [Spigot Watchdog Thread/ERROR]: sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: sun.reflect.NativeMethodAccessorImpl.invoke(
    [14:24:55] [Spigot Watchdog Thread/ERROR]: sun.reflect.DelegatingMethodAccessorImpl.invoke(
    [14:24:55] [Spigot Watchdog Thread/ERROR]: java.lang.reflect.Method.invoke(
    [14:24:55] [Spigot Watchdog Thread/ERROR]:$1.execute(
    [14:24:55] [Spigot Watchdog Thread/ERROR]: org.bukkit.plugin.RegisteredListener.callEvent(
    [14:24:55] [Spigot Watchdog Thread/ERROR]: org.bukkit.plugin.SimplePluginManager.fireEvent(
    [14:24:55] [Spigot Watchdog Thread/ERROR]: org.bukkit.plugin.SimplePluginManager.callEvent(
    [14:24:55] [Spigot Watchdog Thread/ERROR]: net.minecraft.server.v1_8_R3.PlayerConnection.a(
    [14:24:55] [Spigot Watchdog Thread/ERROR]: net.minecraft.server.v1_8_R3.PacketPlayInWindowClick.a(SourceFile:31)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: net.minecraft.server.v1_8_R3.PacketPlayInWindowClick.a(SourceFile:9)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: net.minecraft.server.v1_8_R3.PlayerConnectionUtils$
    [14:24:55] [Spigot Watchdog Thread/ERROR]: java.util.concurrent.Executors$
    [14:24:55] [Spigot Watchdog Thread/ERROR]:
    [14:24:55] [Spigot Watchdog Thread/ERROR]: net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: net.minecraft.server.v1_8_R3.MinecraftServer.B(
    [14:24:55] [Spigot Watchdog Thread/ERROR]: net.minecraft.server.v1_8_R3.DedicatedServer.B(
    [14:24:55] [Spigot Watchdog Thread/ERROR]: net.minecraft.server.v1_8_R3.MinecraftServer.A(
    [14:24:55] [Spigot Watchdog Thread/ERROR]:
    [14:24:55] [Spigot Watchdog Thread/ERROR]:

    Line 386: OfflinePlayer player2 = Bukkit.getOfflinePlayer(nome);

    the var 'nome' is take for mysql Statement
    • Agree Agree x 1
  2. Can you list your plugins? It looks like to be a error with a plugin something like: RankingInv
  3. it's my plugin, RankingInv is my class
  4. Would you mind sharing your code? Are you trying to load a lot of offline player skulls at the same time?
  5. Can you try inserting
    Code (Text):
    if (player2!=null){
    between lines 22 and 23, and add another
    Code (Text):
    between 79 and 80.
  6. You should not connect to a database on the main thread, this should instead be done async. You should also close the ResultSet and the Statement.

    The reason that the server is crashing is that you are trying to load all the offline players on the main thread at the same time. I don't know how big your 'ranks' table is exactly but running through every single entry there and loading the information from the mojang server for every player that isn't cached on the server will block the main thread too long and the server will think it is stuck and therefore crash.

    First of all, I would move the entire connection part into a bukkit runnable that will be executed asynchronously. If you are using Java 8 (something I highly recommend you do) I would also make use of the try-with-resources to make sure that the connection, the statement and the resultset are always closed no matter what happens.

    Secondly, I would update your Statement. I think you are trying to sort the top players based on their 'order'? If so, you don't have to request all the data from the database. You could limit the returned results using LIMIT or TOP, this way you don't have to loop through all the results every time.

    You could also cache the data for X minutes. Because currently, you connect to the database every time you want to show the player a rank top inventory. Caching the data would mean you would only have to refresh the data every x minutes and you won't have to do a lot expensive database querying every time someone wants to see the top inventory.

    There is also no need to first get the player object and right after that get the OfflinePlayer object.

    TL;DR Use async to query the database. Make sure you close your connections, statements and results. Cache the data where possible!
  7. I have done all that things but the server keep going crashing...
    I have looked the last log about the last crash, look:
    Apparently, the Internet of "WebSocket" is down and after this the server is restarted, anyone can help me?
  8. #11 wydgabriel, Jun 24, 2018
    Last edited: Jun 25, 2018
  9. FrostedSnowman

    Resource Staff

    show where you use the openRankTop method
  10. i need help with this, not more with openranktop
  11. Guys, it's a memory leak ram.. I need find where is it (50$ for who can help me).
    The server starts to increase the ram and every 30min the ram gets the max (32gb) and the server are shutted down..
    who can help me? (50$) reward..
  12. Try isolation all the plugins so move one plugin by one to a folder until the server no longer does the error then you know the plugin you just moved was the error
  13. Is your server low on memory or using a high load of CPU?
  14. Maybe it's a problem with Litebans it gives many errors when the server crashes
    Try without Litebans to see if it's the problem
    [08:07:22] [litebans-pool housekeeper/WARN]: [LiteBans] litebans-pool - Thread starvation or clock leap detected (housekeeper delta=2m31s77ms319µs691ns).
    1. [08:07:22] [PaperSpigot Watchdog Thread/ERROR]: litebans.fV.getConnection(
    2. [08:07:22] [PaperSpigot Watchdog Thread/ERROR]: litebans.fV.getConnection(
    3. [08:07:22] [PaperSpigot Watchdog Thread/ERROR]: litebans.d5.a(
    4. [08:07:22] [PaperSpigot Watchdog Thread/ERROR]: litebans.d5.e(
    5. [08:07:22] [PaperSpigot Watchdog Thread/ERROR]: litebans.dF.k(
    6. [08:07:22] [PaperSpigot Watchdog Thread/ERROR]: litebans.dF.f(
    7. [08:07:22] [PaperSpigot Watchdog Thread/ERROR]: litebans.d3.b(
    8. [08:07:22] [PaperSpigot Watchdog Thread/ERROR]:
    • Like Like x 1
  15. I have a dedicated 64gb i7 6700, How can I see cpu
    My other server also use the litebans and the server don't have lag or crashs
Thread Status:
Not open for further replies.