Problem Memory Leaks, FTB Ultimate

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

s_m_w

New Member
Jul 29, 2019
18
0
0
Hello there,

I am running two FTB Ultimate Servers (2GB and 4GB assigned Ram) on a VPS running debian, which has a total of 8GB Ram available. Apart from the MC servers there is not much running that should take up any significant amount of Ram , yet I frequently get crashes on the 4GB server due to the following error, even though it is nowehere near its memory limit:

Code:
2013-03-30 16:40:03 [INFO] [STDERR] Exception in thread "File IO Thread" java.lang.OutOfMemoryError: Java heap space
2013-03-30 16:40:03 [INFO] [STDERR]    at java.util.HashMap.<init>(HashMap.java:223)
2013-03-30 16:40:03 [INFO] [STDERR]    at bq.<init>(SourceFile:12)
2013-03-30 16:40:03 [INFO] [STDERR]    at aam.a(AnvilChunkLoader.java:334)
2013-03-30 16:40:03 [INFO] [STDERR]    at aam.a(AnvilChunkLoader.java:127)
2013-03-30 16:40:03 [INFO] [STDERR]    at im.b(ChunkProviderServer.java:232)
2013-03-30 16:40:03 [INFO] [STDERR]    at im.a(ChunkProviderServer.java:284)
2013-03-30 16:40:03 [INFO] [STDERR]    at in.a(WorldServer.java:844)
2013-03-30 16:40:03 [INFO] [STDERR]    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:373)
2013-03-30 16:40:03 [INFO] [STDERR]    at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:605)
2013-03-30 16:40:03 [INFO] [STDERR]    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:497)
2013-03-30 16:40:03 [INFO] [STDERR]    at fy.run(SourceFile:849)
2013-03-30 16:40:03 [SEVERE] [Minecraft] Encountered an unexpected exception OutOfMemoryError
java.lang.OutOfMemoryError: Java heap space
    at java.util.HashMap.<init>(HashMap.java:223)
    at bq.<init>(SourceFile:12)
    at aam.a(AnvilChunkLoader.java:334)
    at aam.a(AnvilChunkLoader.java:127)
    at im.b(ChunkProviderServer.java:232)
    at im.a(ChunkProviderServer.java:284)
    at in.a(WorldServer.java:844)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:373)
    at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:605)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:497)
    at fy.run(SourceFile:849)
2013-03-30 16:40:03 [INFO] [STDERR] java.lang.OutOfMemoryError: Java heap space
2013-03-30 16:40:03 [INFO] [STDERR]    at java.io.UnixFileSystem.resolve(UnixFileSystem.java:108)
2013-03-30 16:40:03 [INFO] [STDERR]    at java.io.File.<init>(File.java:341)
2013-03-30 16:40:03 [INFO] [STDERR]    at aal.a(SourceFile:45)
2013-03-30 16:40:03 [INFO] [STDERR]    at aal.d(SourceFile:90)
2013-03-30 16:40:03 [INFO] [STDERR]    at aam.a(AnvilChunkLoader.java:197)
2013-03-30 16:40:03 [INFO] [STDERR]    at aam.c(AnvilChunkLoader.java:184)
2013-03-30 16:40:03 [INFO] [STDERR]    at aiw.b(SourceFile:29)
2013-03-30 16:40:03 [INFO] [STDERR]    at aiw.run(SourceFile:22)
2013-03-30 16:40:03 [INFO] [STDERR]    at java.lang.Thread.run(Thread.java:722)
2013-03-30 16:40:03 [SEVERE] [Minecraft] This crash report has been saved to: /home/minecraft/MindcrackServer/./crash-reports/crash-2013-03-30_16.40.03-server.txt

Seems to happen if the server has been running for a while. Memory usage on the VPS keeps rising to 8GB with only the MC servers as RAM-hungry processes running, even though the MC servers only have 2+4GB assigned. Just restarting the server instance does not seem to help, restarting the entire VPS however does. While loading the server I also get the following message:

Code:
2013-03-30 16:34:21 [SEVERE] [ForgeModLoader] Detected leaking worlds in memory. There are 4 worlds that appear to be persisting. A mod is likely caching the world incorrectly
 
2013-03-30 16:34:21 [SEVERE] [ForgeModLoader] The world 3b7ef5bd (world3) has leaked.
 
2013-03-30 16:34:21 [SEVERE] [ForgeModLoader] The world 3ef6af2c (world3) has leaked.

I'm starting each server with the following command (and I have to admit I don't actually know what each parameter does. Found it in a thread that was supposed to alleviate memory problems):

Code:
java -Xms512M -Xmx1G -XX:PermSize=128m -XX:MaxPermSize=512m -XX:+DisableExplicitGC -XX:+AggressiveOpts -jar ftbserver.jar

This has not been a problem while the server was running the Mindcrack Modpack (which was then switched to FTB Ultimate)
 

Dingham

New Member
Jul 29, 2019
294
0
0
I think. This problem is present in all packs, even in mine which is private. We're only seeing it now in the logs because the forges last update now shows it up. Your running out of memory and crashing because -Xmx1G is not a lot of memory for a ultimate pack. Minecrack is smaller so a bit less resource heavy.
 

s_m_w

New Member
Jul 29, 2019
18
0
0
....oops. That was supposed to be 4G, not 1G. What a silly mistake.

Memory usage on the VPS keeps rising to 8GB with only the MC servers as RAM-hungry processes running, even though the MC servers only have 2+4GB assigned.
Still exists however
 

Haruchai

New Member
Jul 29, 2019
73
0
0
First, the Forge/FTB server jar files leak like crazy. I was recently running tests for the guys at Dynmap and every new FTB/Ultimate world I set up would leak. That's with no extra mods and no one ever stepping foot on the map. Once we switched to using MCPC+ for the server files, the world leaks stopped.

Second, I'm no java programmer, so I can't look at a heapdump from your crash and tell you what's happening; however, I can tell you that the second best way to figure this out is run a test world under the same conditions and pull out mods until the problem stops. It's a bit of a pain, but will give you an answer.

As far as the amount of memory to give your server....giving it more memory in cases like this will only delay the inevitable, your crash will still happen sooner or later. The problem is related to one, or a combination of mods working together to not allow garbage cleanup (dumping memory no longer needed).

I know this reply hasn't been very helpful. But you may take a bit of comfort (misery loves company...blah blah) in knowing that these problems are very common with FTB packs. You've got lots of mods that sometimes don't play nice with each other and some of the authors may/may not get along so well and a few that take great offense if you accuse their mod of causing any kind of trouble. Anyway, I guess it's somewhat impressive that this many mods work together at all, but things could certainly be better.