Every 10 minutes (11:35, 11:45, 11:55, 12:05 etc. Not relative to when server is started) my server lags and sometimes drops every player. A lot of people say this is from the world autosaving which it does appear to be but unfortunately it still happens every 10 minutes without fail whether or not I have /save-on or /save-off With nolagg enabled it prints the following: Code: [WARNING] [NoLagg TLN] The main thread failed to respond after 10 seconds [WARNING] [NoLagg TLN] What follows is the stack trace of the main thread [WARNING] [NoLagg TLN] This stack trace will be further refined as long as the thread is stuck [INFO] at java.io.WinNTFileSystem.delete0(Native Method) [INFO] at java.io.Win32FileSystem.delete(Unknown Source) [INFO] at java.io.File.delete(Unknown Source) [INFO] at net.minecraft.server.WorldNBTStorage.save(WorldNBTStorage.java:183) [INFO] at net.minecraft.server.ServerConfigurationManagerAbstract.b(ServerConfigurationManagerAbstract.java:142) [INFO] at net.minecraft.server.ServerConfigurationManagerAbstract.savePlayers(ServerConfigurationManagerAbstract.java:632) [INFO] at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:477) [INFO] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:406) [INFO] at net.minecraft.server.ThreadServerApplication.run(SourceFile:539) and sometimes: [WARNING] [NoLagg TLN] The main thread is still stuck, updated stack trace is: [INFO] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:406) [INFO] Read timed out [WARNING] Can't keep up! Did the system time change, or is the server overloaded? The spike still happens without nolagg. Windows Server 2008 x64 Occurs on both java 1.6 and 1.7 (x64) Have tried a heap of different startup scripts but as usual they don't act how people think they do. Using java -Xmx16384M -Xms16384M -jar at the moment I have noticed it on everything from 2317 to 2327. It was kind of hard to notice on builds prior to 2317 due to the whole plugin async chat thing. This occurs while running nothing but Towny, Vault, Essentials+groupmanager and Worldedit+worldguard+commandhelper. I have tried using /save-off but all that seems to have done for me is not unload chunks whereas the lag still happens. I have tried turning off any save feature in the plugins listed above. With just one player on the server it is, most of the time, nearly impossible to tell if it's happening or not and for this reason I am not sure of the issue with a vanilla bukkit server although I have seen many (poorly) documented accounts of the same issue on vanilla servers (also generally followed by some irrelevant miracle cure unconfirmed by the original poster) I'm not necessarily looking for something entirely solid but, at the very least, a way to work around this because I have seen many servers running without this issue. Thanks to anyone in advance for any help that could be offered. Edit: Same results with no plugins and with fresh map.
A lot of people are saying they fixed it with /save-off which doesn't help me but there are definitely servers that seem to not have this issue at the moment. Don't know if its a specific build, a rebuild or specific plugin but there is definitely something working. Any ideas? EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Sounds like something is causing your server to just... freeze.(at least the main server thread as mentioned by NoLagg.) It's only a guess but I'm going to suggest that either windows is the cause or something using the same CPU core as the main bukkit thread is using 100% of that core and not allowing Bukkit to do anything during that time. If you can, check your CPU usage during this time to see if there is a random spike in something.
Hardware is 100%. Cpu spikes but highest any of the cores goes is around 60%. During all of these, Ram usage is sitting around 30%. The machine is dedicated to the minecraft server and nothing else. i7 930 (2.8ghz) 24gb ram, 16 assigned in startup script (successfully, according to essentials) Harddrive is clean and perfectly functional and issue still occurs on a ramdisk.
How populated is your server? 0 plugins, fresh map, /save-off and with hardly any people on its extremely noticible. The more people that join the heavier it gets. Put up a ticket https://bukkit.atlassian.net/browse/BUKKIT-2271#comment-18425 Any ideas at all, here or there, would be great. (I'm also firebuny on espernet) EDIT by Moderator: merged posts, please use the edit button instead of double posting.
I have the same problem. And it is related to corrupt player files in world/players If I try to log in with the last player that logged in before crash, I crash the server. If I delete he's .dat file. The server works again and he can log in and he doesn't crash the server. Although I'm not aware what exactly causes this problem. I have noticed that people get corrupt when not in main world. They log in in world nether or the end and then they get corrupt somehow.
This is a completely different issue. The problem I am talking about occurs on a completely fresh vanilla bukkit server exactly every 10 minutes without fail.
I've seen this issue when starting my server linux ubuntu 24gb ram i7-980x Code: 2012-08-14 21:04:28 [WARNING] [NoLagg TLN] The main thread failed to respond after 10 seconds 2012-08-14 21:04:28 [WARNING] [NoLagg TLN] What follows is the stack trace of the main thread 2012-08-14 21:04:28 [WARNING] [NoLagg TLN] This stack trace will be further refined as long as the thread is stuck 2012-08-14 21:04:28 [INFO] at net.minecraft.server.World.getTypeId(World.java:165) 2012-08-14 21:04:28 [INFO] at net.minecraft.server.World.e(World.java:1396) 2012-08-14 21:04:28 [INFO] at net.minecraft.server.Entity.move(Entity.java:650) 2012-08-14 21:04:28 [INFO] at net.minecraft.server.EntityItem.h_(EntityItem.java:61) 2012-08-14 21:04:28 [INFO] at net.minecraft.server.World.entityJoinedWorld(World.java:1239) 2012-08-14 21:04:28 [INFO] at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:498) 2012-08-14 21:04:28 [INFO] at net.minecraft.server.World.playerJoinedWorld(World.java:1221) 2012-08-14 21:04:28 [INFO] at net.minecraft.server.World.tickEntities(World.java:1119) 2012-08-14 21:04:28 [INFO] at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:563) 2012-08-14 21:04:28 [INFO] at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:212) 2012-08-14 21:04:28 [INFO] at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:472) 2012-08-14 21:04:28 [INFO] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:404) 2012-08-14 21:04:28 [INFO] at net.minecraft.server.ThreadServerApplication.run(SourceFile:539) and another one, different and longer http://pastebin.com/DPT976Sj
In MinecraftServer.java Disabled: if (this.ticks % 6000 == 0) { this.n.b(); With no change Disabled: if (this.ticks % 900 == 0) { // this.methodProfiler.a("save"); // CraftBukkit - not in production code this.t.savePlayers(); this.saveChunks(true); // this.methodProfiler.b(); // CraftBukkit - not in production code } with no change (to the 10 minute lag. The 45s lag is unnoticable on my server) Disabled: worldserver.save(true, (IProgressUpdate) null in MinecraftServer:308 with no change Then tried disabling the entire saveChunks method: Again, no change to lag Backup plugins don't help. Happens on multiple machines. Does anyone have any idea what to do? EDIT by Moderator: merged posts, please use the edit button instead of double posting.
i had something like tke that, once a minute i got lagspike, i just changed my CPU mode from auto to always run on 4000 mhz (auto gave it 1800 and more if needed) No more lag for me atleast So if ur CPU is on automode, try to set it on a a stationary mhz so it wont "jump"
Skywalker55, that stack trace provided by NoLagg means that when the server tries to autosave, windows does not respond to a file delete request. Therefore, changes to CPU setting should have no effect. The problem could be one of the below: The Hardrive where the world is saved is failing. This could cause the drive to not-respond for long periods of time. This case however, seems unlikely, because the server world is not corrupted. The world is being cached in RAM and the harddrive has not spun up yet. This is the likely case for me. Do you run a RAMdisk? Or, do you use a harddrive other than C: to run the server? Thanks, Keeley
Thx for reply. We have dedicated server (Intel Bi Xeon E56062x4x2.13+ GHz16GB RAM DDR3). When server is empty there r no spikes, 3-4 players online and it starts jumping. Ram usage is max 20 %, when cpu sometimes 100% ;//