Damn chunk manager!

General talk about Minecraft!
Post Reply
User avatar
Foxtrot200
Posts: 131
Joined: Sun Jul 25, 2010 9:04 pm

Damn chunk manager!

Post by Foxtrot200 » Wed Jul 27, 2011 3:01 pm

Original Post wrote:Why the hell does Minecraft not unload stuff when it should?

If anyone would care to see why the server crashes so much, here's an excerpt from the log file that is usually preceded by hundreds of "[WARNING] Can't keep up! Did the system time change, or is the server overloaded?" messages:

Code: Select all

2011-07-26 16:57:57 [SEVERE] java.lang.OutOfMemoryError: Java heap space
2011-07-26 16:57:57 [SEVERE] 	at net.minecraft.server.NBTTagByteArray.a(SourceFile:21)
2011-07-26 16:57:57 [SEVERE] 	at net.minecraft.server.NBTBase.b(SourceFile:64)
2011-07-26 16:57:57 [SEVERE] 	at net.minecraft.server.NBTTagCompound.a(SourceFile:24)
2011-07-26 16:57:57 [SEVERE] 	at net.minecraft.server.NBTBase.b(SourceFile:64)
2011-07-26 16:57:57 [SEVERE] 	at net.minecraft.server.NBTTagCompound.a(SourceFile:24)
2011-07-26 16:57:57 [SEVERE] 	at net.minecraft.server.NBTBase.b(SourceFile:64)
2011-07-26 16:57:57 [SEVERE] 	at net.minecraft.server.CompressedStreamTools.a(SourceFile:46)
2011-07-26 16:57:57 [SEVERE] 	at net.minecraft.server.ChunkRegionLoader.a(SourceFile:29)
2011-07-26 16:57:57 [SEVERE] 	at net.minecraft.server.ChunkProviderServer.loadChunk(ChunkProviderServer.java:136)
2011-07-26 16:57:57 [SEVERE] 	at net.minecraft.server.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:65)
2011-07-26 16:57:57 [SEVERE] 	at net.minecraft.server.PlayerInstance.<init>(PlayerInstance.java:31)
2011-07-26 16:57:58 [SEVERE] 	at net.minecraft.server.PlayerManager.a(PlayerManager.java:45)
2011-07-26 16:57:58 [SEVERE] 	at net.minecraft.server.PlayerManager.movePlayer(PlayerManager.java:141)
2011-07-26 16:57:58 [SEVERE] 	at net.minecraft.server.ServerConfigurationManager.d(ServerConfigurationManager.java:138)
2011-07-26 16:57:58 [SEVERE] 	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:363)
2011-07-26 16:57:58 [SEVERE] 	at net.minecraft.server.Packet10Flying.a(SourceFile:126)
2011-07-26 16:57:58 [SEVERE] 	at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
2011-07-26 16:57:58 [SEVERE] 	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
2011-07-26 16:57:58 [SEVERE] 	at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
2011-07-26 16:57:58 [SEVERE] 	at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
2011-07-26 16:57:58 [SEVERE] 	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
2011-07-26 16:57:58 [SEVERE] 	at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
2011-07-26 16:57:58 [SEVERE] Unexpected exception
java.lang.OutOfMemoryError: Java heap space
	at net.minecraft.server.NBTTagByteArray.a(SourceFile:21)
	at net.minecraft.server.NBTBase.b(SourceFile:64)
	at net.minecraft.server.NBTTagCompound.a(SourceFile:24)
	at net.minecraft.server.NBTBase.b(SourceFile:64)
	at net.minecraft.server.NBTTagCompound.a(SourceFile:24)
	at net.minecraft.server.NBTBase.b(SourceFile:64)
	at net.minecraft.server.CompressedStreamTools.a(SourceFile:46)
	at net.minecraft.server.ChunkRegionLoader.a(SourceFile:29)
	at net.minecraft.server.ChunkProviderServer.loadChunk(ChunkProviderServer.java:136)
	at net.minecraft.server.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:65)
	at net.minecraft.server.PlayerInstance.<init>(PlayerInstance.java:31)
	at net.minecraft.server.PlayerManager.a(PlayerManager.java:45)
	at net.minecraft.server.PlayerManager.movePlayer(PlayerManager.java:141)
	at net.minecraft.server.ServerConfigurationManager.d(ServerConfigurationManager.java:138)
	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:363)
	at net.minecraft.server.Packet10Flying.a(SourceFile:126)
	at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
	at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
	at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
	at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
If you knew anything about the way Minecraft works, you'd know that these are all standard Minecraft functions and not plugin functions. That means Minecraft is crashing itself. Why?!

Why are the chunks not unloaded when they should be?
Why do I have to constantly save-all and restart the server to keep the world data from being lost?
Why do I wake up every day to "The server died."?

Unfortunately, the problem isn't Minecraft; The problem is Bukkit.
Bukkit is the server mod we are currently running, for those of you who don't already know. It enables extensive functionality with it's plugin API. Minecraft wasn't made for this. Minecraft was made to be run standalone. The vanilla server ran for days on end without any sign of crashing. Yes, Bukkit is still in development, but you'd think they'd have worked this out.

As the error log says, the problem is memory; The server keeps running out of it. The Bukkit devs recommend 1 GB per 10 players. There's one problem with this recommendation: Though our server is 20 slots, lately it only sees about 5 people on a busy day. According to the Bukkit devs, we shouldn't be running out of any memory.

If the devs are right, perhaps my hypothesis about the errors is wrong. Perhaps a plugin is causing it, but which one? It MUST be a plugin associated with chunk data or we wouldn't be getting memory heap errors associated with chunk data.

So, let's go down the list and see what is a possibility:
BananaChunk - Maybe, but not likely. This plugin only sends chunks when it detects a player in a position they shouldn't be.
BigBrother - Not likely as it doesn't load chunk data. It just logs events.
BlueTelePads - Not likely, it only uses player data.
CommandBook - Not likely, this plugin does a lot of things, but none of it's features relate to chunk loading.
Craftbook - Possible. It's supposed to keep chunks with Minecarts loaded, but that feature is incomplete and likely disabled in the code.
iChat - Not possible. It only affects the chat.
Jail - Not likely, though it does user player listeners for jail protection.
LWC - Doubtful, it checks against block change and interact events for functionality.
MultiInv - Not possible, only affects player data.
MyHome - Not possible, only affects player data.
MyWarp - Not possible, only affects player data.
NoCheat - Not likely, I'm not certain on it's methods for checking for cheats.
Permissions - Impossible, it's a plugin dependency that only handles it's own files.
Rawcritics Ore Obfuscation Plugin - Not likely, it only handles chunks being sent to players which should be loaded.
SimpleSave - Possible cause for crashes, but it doesn't load any chunks. It just writes them to the world files.
Tele++ - Not likely, mostly affects player data.
WorldEdit - Possible, does have chunk handling capabilities.
WorldGuard - Possible, does listen to loaded chunks for block changes.
WorldManager - Possible, loads other worlds (Currently unloaded from the server. Crashes still happening with it gone.)

From this list, I see a few likely candidates:
WorldEdit, WorldGuard, and Craftbook, all of which are written by SK89q, one of the Bukkit devs who should know how to properly interface with the plugin API.

Mostly, I think this is due to the Bukkit world manager. I guess it just loads too much in an attempt to cut down on chunk errors and player lag, but at the cost of the server.

The plugins only take advantage of what Bukkit does normally. They can cause lag and can tell Bukkit to act differently, but I haven't experienced problems with WorldEdit, WorldGuard, or Craftbook before. Besides that, we need WorldGuard and WorldEdit is a dependency for it.

We can go on without Craftbook if we must, though it'd render our gate and lift signs useless.

Tell me what you think about all this. I've tried everything I can to get this damn thing functional and it just isn't working.
I found the problem: Whenever SimpleSave starts, it issues a save-off command to the server so it can setup it's own saving schedule, However, this stops the server from periodically writing to the world files on it's own. I've replaced SimpleSave with Mantra Save and it seems to have cleared it up. Let's hope it won't happen again.
Image
User avatar
yuki_fox_demon
Posts: 214
Joined: Mon Jul 26, 2010 7:56 pm
Location: in his heart.

Re: Damn chunk manager!

Post by yuki_fox_demon » Mon Aug 01, 2011 11:09 am

do whatever yo uthink is best, foxy. we all did perfectly fine on the vanilla server, we dont have to have all the gate warps and such :3 there's regular warps anyhow
Image
User avatar
KreamCheese
Posts: 124
Joined: Thu Jan 06, 2011 2:27 am
Location: Fort Wayne, Indiana
Contact:

Re: Damn chunk manager!

Post by KreamCheese » Tue Aug 02, 2011 12:38 pm

I'd have to agree with Yuki's statement: do what you think would be best, Fox.
~Dance Kirby Dance~
<(^.^<) <(^.^)> (>^.^)>
Post Reply

Return to “General Discussion”