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 http://www.spigotmc.org/
    [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(YggdrasilGameProfileRepository.java:81)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: net.minecraft.server.v1_8_R3.UserCache.a(UserCache.java:85)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: net.minecraft.server.v1_8_R3.UserCache.getProfile(UserCache.java:145)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: org.bukkit.craftbukkit.v1_8_R3.CraftServer.getOfflinePlayer(CraftServer.java:1299)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: org.bukkit.Bukkit.getOfflinePlayer(Bukkit.java:745)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: wolfe.rocketgrid.Ranking.RankingInv.openRankTop(RankingInv.java:386)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: wolfe.rocketgrid.Rankup.RankInvClick.onClick(RankInvClick.java:59)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: java.lang.reflect.Method.invoke(Method.java:498)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:1630)
    [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$1.run(SourceFile:13)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: java.util.concurrent.FutureTask.run(FutureTask.java:266)
    [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(MinecraftServer.java:715)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557)
    [14:24:55] [Spigot Watchdog Thread/ERROR]: java.lang.Thread.run(Thread.java:748)


    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: https://pastebin.com/FxkTktmX
    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 https://pastebin.com/FxkTktmX, 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(fV.java:20)
    2. [08:07:22] [PaperSpigot Watchdog Thread/ERROR]: litebans.fV.getConnection(fV.java:4)
    3. [08:07:22] [PaperSpigot Watchdog Thread/ERROR]: litebans.d5.a(d5.java:186)
    4. [08:07:22] [PaperSpigot Watchdog Thread/ERROR]: litebans.d5.e(d5.java:177)
    5. [08:07:22] [PaperSpigot Watchdog Thread/ERROR]: litebans.dF.k(dF.java:31)
    6. [08:07:22] [PaperSpigot Watchdog Thread/ERROR]: litebans.dF.f(dF.java:6)
    7. [08:07:22] [PaperSpigot Watchdog Thread/ERROR]: litebans.d3.b(d3.java:11)
    8. [08:07:22] [PaperSpigot Watchdog Thread/ERROR]: litebans.d3.call(d3.java:9)
     
    • 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.