"Out of Memory Error" causing headaches

Discussion in 'Bukkit Help' started by NotYetRated, May 17, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    NotYetRated

    I am getting an "out of memory error" causing me severe headaches. it brings the entire server down. I seems to happen about once every 24 hours of continuous run time. I get this error running MineOS+ in a RAMdisk. Both on a dedicated box with 3 gigs RAM, and in a virtual PC with 3 gigs dedicated out of 12 possible. I have removed all plugins and it takes much longer to happen, though still does.

    Code:
    2011-05-17 09:34:06 [SEVERE] java.lang.OutOfMemoryError
    2011-05-17 09:34:06 [SEVERE] at java.util.zip.Deflater.init(Native Method)
    2011-05-17 09:34:06 [SEVERE] at java.util.zip.Deflater.(Deflater.java:168)
    2011-05-17 09:34:06 [SEVERE] at java.util.zip.Deflater.(Deflater.java:185)
    2011-05-17 09:34:06 [SEVERE] at java.util.zip.DeflaterOutputStream.(DeflaterOutputStream.java:162)
    2011-05-17 09:34:06 [SEVERE] at java.util.zip.DeflaterOutputStream.(DeflaterOutputStream.java:175)
    2011-05-17 09:34:06 [SEVERE] at net.minecraft.server.RegionFile.b(SourceFile:242)
    2011-05-17 09:34:06 [SEVERE] at net.minecraft.server.RegionFileCache.d(SourceFile:94)
    2011-05-17 09:34:06 [SEVERE] at net.minecraft.server.ChunkRegionLoader.a(SourceFile:58)
    2011-05-17 09:34:06 [SEVERE] at net.minecraft.server.ChunkProviderServer.saveChunk(ChunkProviderServer.java:160)
    2011-05-17 09:34:06 [SEVERE] at net.minecraft.server.ChunkProviderServer.unloadChunks(ChunkProviderServer.java:225)
    2011-05-17 09:34:06 [SEVERE] at net.minecraft.server.World.doTick(World.java:1450)
    2011-05-17 09:34:06 [SEVERE] at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:363)
    2011-05-17 09:34:06 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:287)
    2011-05-17 09:34:06 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    2011-05-17 09:34:06 [SEVERE] Unexpected exception
    java.lang.OutOfMemoryError
    at java.util.zip.Deflater.init(Native Method)
    at java.util.zip.Deflater.(Deflater.java:168)
    at java.util.zip.Deflater.(Deflater.java:185)
    at java.util.zip.DeflaterOutputStream.(DeflaterOutputStream.java:162)
    at java.util.zip.DeflaterOutputStream.(DeflaterOutputStream.java:175)
    at net.minecraft.server.RegionFile.b(SourceFile:242)
    at net.minecraft.server.RegionFileCache.d(SourceFile:94)
    at net.minecraft.server.ChunkRegionLoader.a(SourceFile:58)
    at net.minecraft.server.ChunkProviderServer.saveChunk(ChunkProviderServer.java:160)
    at net.minecraft.server.ChunkProviderServer.unloadChunks(ChunkProviderServer.java:225)
    at net.minecraft.server.World.doTick(World.java:1450)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:363)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:287)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    2011-05-17 09:34:40 [INFO] Read timed out
    2011-05-17 09:35:02 [INFO] Read timed out
    2011-05-17 09:35:11 [INFO] Read timed out
    2011-05-17 09:35:56 [INFO] Read timed out
    2011-05-17 09:36:01 [INFO] Read timed out 
     
  2. Offline

    Frogger4

    I know this may seem obvious - but what propt or command are you using to start the server? (it possible you could just be using the wrong syntax to designate the heap sizes)

    edit: In case I don't make any sense, are you actually designating all 3 GB of ram to the server?
     
  3. Offline

    NotYetRated

    I am running on MineOS, which has a webui and uses a "start" button. The syntax they use, as I have found it in their code, is
    Code:
     def execute(self, command, arg_string=None):
            if command == 'start':
                if self.mod == 'bukkit':
                    return 'cd %s; screen %s -dmS mc-%s %s -server -Xms%iM -Xmx%iM -jar %s -p %i -s %i -c %s -w %s -P %s' % \
                           (self.cwd,
                            self.screen_config,
                            self.worldname,
                            os.path.join(environment.JAVA_PATH, 'java'),
                            self.memory,
                            self.memory,
                            os.path.join(environment.MC_PATH, self.server_jar),
                            self.port,
                            self.max_players,
                            os.path.join('server.properties'),
                            os.path.join('world'),
                            os.path.join('plugins'))
    As for the ram, as I am running on a RAM disk, with the os having an overhead of about 200 megs, I am starting the server with the 32-bit max of 2.5 gigs. I have also ran it on 64-bit starting it with 2.7 gigs.
     
  4. Offline

    TnT

    What is the output of your "java - version" command? Have you tried running the server manually - aka, not through the MineOS script?
     
  5. Offline

    NotYetRated

    When running on 64-bit, java output is

    Code:
    openjdk version "1.7.0-internal"
    
    When running 32 bit, it was the latest stable java...

    Ohh and I have not run it manually as I am not 100% sure how to do so?
     
  6. Offline

    TnT

    To run it manually, open up a console (either SSH, or directly on the box) and type in:

    java -Xincgc -Xmx1G -jar craftbukkit.jar nogui

    Its as simple as that. Adjust the 1G as necessary. Also, you can stick with x64 Java - no reason to go to x86.
     
  7. Offline

    NotYetRated

    I will give it a shot this evening! Thank you very much.
     
Thread Status:
Not open for further replies.

Share This Page