[SPIGOT-6648] Server crashes after tens of teleports Created: 14/Jul/21 Updated: 16/Jul/21 Resolved: 14/Jul/21 |
|
| Status: | Resolved |
| Project: | Spigot |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Eli | Assignee: | Unassigned |
| Resolution: | Invalid | Votes: | 0 |
| Labels: | None | ||
| Environment: |
https://www.ovhcloud.com/en/bare-metal/rise/rise-2/ This specfic Minecraft server runs 7GB RAM |
||
| Version: | 3180-Spigot-38e6c03-ca0fe5b (MC: 1.17.1) |
| Plugin: | my own, 'me.justeli.common.api.teleport.TeleportExecutor.teleport(TeleportExecutor.java:146)' is nothing more than Player#teleport(Location) |
| Guidelines Read: | Yes |
| Description |
|
This has been occuring eversince I updated to 1.17.1 from 1.17. Every time after about 20-50 teleports the server randomly freezes and crashes. The server freezes directly before someone is teleported (i.e. by doing /home). The server usually has an uptime of about an hour or two. It never occurs for teleporting to the same locations, it is a different location with every crash (also locations that didn't make the server crash before). Here's the crash in console: https://pastebin.com/wPHhMe9v I've tried many things: remove plugins that were recently updated (not running many anyways), reset bukkit.yml and spigot.yml to default, change Player#teleport(Location) to PaperLib's async teleport (I write my own plugins for this server), remove startup flags that the server had, and more spigot-unrelated. In the report you'll see `me.justeli.common.api.teleport.TeleportExecutor.teleport(TeleportExecutor.java:146)` simply teleports a player: `player.teleport(location)`. In this specific report there's also PaperLib, because I was trying that out as an attempt fix the issue. The crashes also occur without PaperLib. The server has crashed ~60 times in the past 4 days. It also freezes when chunks are saving after the server is shut down by the crash. |
| Comments |
| Comment by Marvin Rieple [ 16/Jul/21 ] |
|
After some testing, I would say this is more a problem with your hardware than with spigot. Your server hardware is not fast enough to generated / store the chunks. Looking at the hardware you linked, you are using a HDD it can be that this one is not fast enough and you might want to upgrade to a SSD. For my testing I constantly teleport two players to a random location every 5 seconds. When I run the server over my old HDD the first few teleports are ok, (under 1 second teleport time) but the provided RAM keeps growing as sone as the RAM hits nearly 100%. My HDD usage become 100% and the time it takes to teleport increased to around 14 seconds. My server didn't crash because the watchdog time out is 60 seconds. When switching over to my SSD I had no problem at all and the teleport time was under 1 seconds even after hundreds of teleports. This is why I suspect that is a drive speed issue, which cannot keep up with storing / reading the chunks.
I would recommend monitoring the drive and CPU utilisation and see if they are at their limit and if so you may want to upgrade or try to pre-generated your world if you didn't already do this. If you need more help I would recommend opening a post on the forum https://www.spigotmc.org/forums/ and provide more infos such as your timeout-time in the spigot.yml, CPU and drive utilisation, player count, if the map is pre-generated or not, etc.
Code used for testing: int teleport = 0; @EventHandler public void onPlayerJoin(PlayerJoinEvent event) { getLogger().info("Player " + event.getPlayer().getName() + " joined, starting teleporting"); Bukkit.getScheduler().runTaskTimer(this, () -> { int x = ThreadLocalRandom.current().nextInt(-50000 ,50000); int y = 100; int z = ThreadLocalRandom.current().nextInt(-50000 ,50000); getLogger().info("[" + event.getPlayer().getName() + "] teleport #" + teleport + " Coordinates x: " + x + " z:" + z); event.getPlayer().teleport(new Location(event.getPlayer().getWorld(), x, y, z)); getLogger().info("[" + event.getPlayer().getName() + "] teleport #" + teleport + " Done!"); teleport++; }, 20, 20 * 5); } |
| Comment by Eli [ 16/Jul/21 ] |
|
Oh I'm sorry, I copied over the wrong crash report, from the first time it happened back when it ran Paper. Downgraded to Spigot right after that and ran it for 3 days. Here's the crash report I was supposed to post: https://pastebin.com/wPHhMe9v Updated the crash report in the issue as well. |
| Comment by md_5 [ 14/Jul/21 ] |
|
Not running spigot |