Server lagspikes

Discussion in 'Spigot Help' started by BlueMark, Jul 17, 2018.

  1. Ok so im using a 1.8.8 spigot with protocol support for 1.7.10 and recently the server is getting lagspikes like the server freezes every 2-3 minutes for like 5 seconds then everything is good(19.80+ tps > 5 sec lag > 19.50 tps). Also sometimes when it get's a freeze for like 10 seconds the fps of the players are dropping to 0 then after that everything is fine.
    The spigot.yml. paper.yml, bukkit.yml is configured correctly. By using the plugin TopLite i saw that the plugin skript is using the most of the RAM( ).
    Every idea is highly appreciated
  2. Might be a corrupt chunk
  3. The server lagging wouldn’t affect player’s FPS, however if this is in fact happening this could mean there is a problem around that area such as a lag machine which clients are generally having problems rendering.
    Also I believe that the red line in TopLite is CPU usage and not ram usage however this does support the TPS drops, just from what you’ve shown us I would suggest disabling script and having them remade as Java plugins which is by default a lot faster. Furthermore, should this not be the issue please provide a timings report using /timings.
    Also why is there a minimal amount of ram allocated?
  4. If it lags every few minutes for a few seconds it's probably the garbage collector kicking in. Make sure your server has enough RAM, and if not, give it more.

    Also, how much Skript are you using? I hope you're not building a server from top to bottom using Skript...
    • Optimistic Optimistic x 1
  5. How many players are you normaly getting? Is there a pattern when the lag occures? Does the FPS drop everywhere?
  6. i get like 50 players on that server and yes i made the whole server with skript because i don't know that much java to code sg plugins and stuff.
    it's not a pattern it just spikes randomly not there are no corrupted chunks or lag machines. The fps drops only if the server spikes for 10 seconds. Is the main problem because of the scripts? If yes just tell me. Here are the timings:
  7. Well, if Skript is not fully to blame for this, it's at least part of your performance thing. Skript should be used to make tiny, small, simple changes to a server. If you're using Skript for massive plugins such as factions, towny, some RPG related stuff or whatever kind of server you have, it's only natural it starts to lag like hell. Skript is not as great as people think; it's great for the small quick adjustments, but people abuse it and use it to build entire servers with, and seems like you're no exception. Making your entire server in Skript is an absolute terrible idea and you should really swap to regular Java plugins.
    • Like Like x 3
    • Agree Agree x 1
    • Optimistic Optimistic x 1
  8. My experience with this is on chunk generation. if the map is new and players are exploring on the outer edges of the map this will generate new chunks which causes random lag spikes. This is especially true to HDD storage. You must pre generate the map to the full extent of your desired map size. I recommend downloading WORLDBORDER then pre generate your map. as to lessen the load when players are exploring.
  9. The only red marking in your timings report is by skript. So I'd say, yes.
  10. thx for all the ideas but where can i learn java coding for spigot?
  11. Many sources, and many people learn differently. How did you learn Skript? Remake that procedure but for java.
  12. skript made my job easier as a developer because it's kind of like the c++, programming language that i know perfectly but java seems too different to me i can't understand half of the codes made in java i don't even know the structure of a plugin made in java
  13. If there's a will, there's a way. Slowly learn. As I've mentioned, there's no set way to learn it. First, setup a basic coding environment, then follow tutorials on making plugins.
  14. can you give me a link for a start please? That would be helpful
  15. Who uses Skype 2018?
    • Agree Agree x 1
  16. Please dont defame C++ like that.
  17. @BlueMark
    Yo, if you need any help in Java, contact me. I used to be a complete c++ main until I found out how easy it was to transfer to Java, and the only debuff is that Java has a JVM that makes it much slower than C++. Otherwise, its an amazing language, and can be used in so many different ways. I can get you started on java plugins :)
    add me on disc @ Nitro_88#5322