OutOfMemoryError: Java heap space

Discussion in 'Bukkit Help' started by blaba, Jan 8, 2012.

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

    blaba

    Hey guys, i got a serious problem. On Thursday evening the server began to lag very hard. The console always said
    almost every 5 seconds. I restarted the server but nothing changed. I didn't change anything concerning the plugins or something else. I tried to shut down every plugin by hand but it didn't help.

    Now today I got an exception mentioned in the headline:

    Code:
    2012-01-08 14:16:11 [SEVERE] java.lang.OutOfMemoryError: Java heap space
    2012-01-08 14:16:11 [SEVERE]     at java.util.Arrays.copyOf(Arrays.java:2746)
    2012-01-08 14:16:11 [SEVERE]     at java.util.ArrayList.ensureCapacity(ArrayList.java:187)
    2012-01-08 14:16:11 [SEVERE]     at java.util.ArrayList.add(ArrayList.java:378)
    2012-01-08 14:16:11 [SEVERE]     at net.minecraft.server.AxisAlignedBB.b(SourceFile:25)
    2012-01-08 14:16:11 [SEVERE]     at net.minecraft.server.Block.e(Block.java:279)
    2012-01-08 14:16:11 [SEVERE]     at net.minecraft.server.Block.a(Block.java:271)
    2012-01-08 14:16:11 [SEVERE]     at net.minecraft.server.World.getEntities(World.java:979)
    2012-01-08 14:16:11 [SEVERE]     at net.minecraft.server.Entity.move(Entity.java:417)
    2012-01-08 14:16:11 [SEVERE]     at net.minecraft.server.EntityLiving.a(EntityLiving.java:751)
    2012-01-08 14:16:11 [SEVERE]     at net.minecraft.server.EntityLiving.d(EntityLiving.java:913)
    2012-01-08 14:16:11 [SEVERE]     at net.minecraft.server.EntityMonster.d(EntityMonster.java:27)
    2012-01-08 14:16:11 [SEVERE]     at net.minecraft.server.EntitySkeleton.d(EntitySkeleton.java:66)
    2012-01-08 14:16:11 [SEVERE]     at net.minecraft.server.EntityLiving.w_(EntityLiving.java:297)
    2012-01-08 14:16:11 [SEVERE]     at net.minecraft.server.EntityMonster.w_(EntityMonster.java:31)
    2012-01-08 14:16:11 [SEVERE]     at net.minecraft.server.World.entityJoinedWorld(World.java:1253)
    2012-01-08 14:16:11 [SEVERE]     at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:107)
    2012-01-08 14:16:11 [SEVERE]     at net.minecraft.server.World.playerJoinedWorld(World.java:1235)
    2012-01-08 14:16:11 [SEVERE]     at net.minecraft.server.World.tickEntities(World.java:1142)
    2012-01-08 14:16:11 [SEVERE]     at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:518)
    2012-01-08 14:16:11 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
    2012-01-08 14:16:11 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    2012-01-08 14:16:11 [SEVERE] Unexpected exception
    java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(Arrays.java:2746)
        at java.util.ArrayList.ensureCapacity(ArrayList.java:187)
        at java.util.ArrayList.add(ArrayList.java:378)
        at net.minecraft.server.AxisAlignedBB.b(SourceFile:25)
        at net.minecraft.server.Block.e(Block.java:279)
        at net.minecraft.server.Block.a(Block.java:271)
        at net.minecraft.server.World.getEntities(World.java:979)
        at net.minecraft.server.Entity.move(Entity.java:417)
        at net.minecraft.server.EntityLiving.a(EntityLiving.java:751)
        at net.minecraft.server.EntityLiving.d(EntityLiving.java:913)
        at net.minecraft.server.EntityMonster.d(EntityMonster.java:27)
        at net.minecraft.server.EntitySkeleton.d(EntitySkeleton.java:66)
        at net.minecraft.server.EntityLiving.w_(EntityLiving.java:297)
        at net.minecraft.server.EntityMonster.w_(EntityMonster.java:31)
        at net.minecraft.server.World.entityJoinedWorld(World.java:1253)
        at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:107)
        at net.minecraft.server.World.playerJoinedWorld(World.java:1235)
        at net.minecraft.server.World.tickEntities(World.java:1142)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:518)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    
    What does this mean? I have 3GB of RAM reserved for Minecraft and it all ran well until Thursday evening.

    Here is some additional info about the server and its plugins:
    Server is running a Xeon E5620 @2,4ghz with 4GB of RAM. The OS is Ubuntu 9.04
    Plugins are:
    ChestShop, DropClear, dynmap, Essentials (all kinds),FalseBook(all kinds), LWC, MineBackup, MobileAdmin, MoneyDrop, PlugMan, Vault, WorldBorder, WorldEdit and WorldGuard.
    And of course I'm running craftbukkit 1.0.1 R1 with this start.sh:


    Code:
    #!/bin/sh
    screen -S bukkit java -Xmx3072m -Xincgc -jar craftbukkit-1.0.1-R1.jar
    I attached the server.log after starting the server.

    Thanks for your help :)
     

    Attached Files:

    MikeA likes this.
  2. Offline

    MikeA

    How many players do you usually have online when this happens? The "Can't keep up!" error happens to everyone, just ignore it or install the plugin "obuShutTheHellUp" to remove that error.

    I think this is caused by MineBackup, but I am not sure. Try removing MineBackup?

    Also your server doesn't have much RAM... Do you rent a server? If so send me a Private message and I'll show you a server better then yours that is probably cheaper ;)
     
  3. Offline

    blaba

    Usually we are 8-10 Players without having a problem, now only one player causes the error. The "Can't keep up!" appears every 5 seconds, I think that's not normal ;)

    I removed MineBackup but nothing changed.
    Any other suggestions?
     
  4. Offline

    MikeA

    The only other thing I would think of straight up would the world being corrupted somehow since it is showing an entity error. Try backing up your map and generate a fresh one?
     
  5. Offline

    Pezmantbh

    If the issue is world related, zip the world and upload it to mediafire.com - then send me the link

    I can fix it :)
     
  6. Offline

    blaba

    The world is about 350mb big, i zipped it to 330mb, but with my upload it lasts about 3 hours. Maybe I upload it tomorrow in the University. But for now I try a backup from Wednesday. Let's see if it works.
     
  7. Offline

    Pezmantbh

  8. Offline

    Evangon

    It's because the designated java heap size is not enough for the server. Tinker around with the .bat, or if you have a hoster, upgrade to a new server. Most likely it is because of not enough RAM. I say minium for a public server, at least 1 gig.
     
  9. Offline

    blaba

    @Evangon: Well, as I said in the first post, I'm reserving 3gig of RAM, that was and is enough I think.

    @Pezmantbh: I tried the backup from Wednesday but the problem is still alive. I uploaded the world(s) to Mediafire here:
    <Edit by Moderator: Redacted mediafire url>
    <Edit by Moderator: Redacted mediafire url>
    I don't think it changes anything if you fix something, but I'll give you a try. Maybe you find a solution. Btw how do you fix it? :)
     
    Last edited by a moderator: Nov 11, 2016
  10. Offline

    Pezmantbh

    Here is the link to your fixed world:
    http://uploading.com/files/37c8e8fb/world.zip/

    It is currently uploading, and will be finished in about an hour :)
    Please note that is just the main world folder, not the nether or the_end.

    Let me know if it works :)
     
  11. Offline

    Nathan C

    This sounds either like: Disk I/O issue, or CPU bottleneck. Could be RAM, but with stock bukkit this should not happen, unless you have lots of players on.

    Is this a dedicated server, if so how many hard drives you have? And can you run this WHILE the server is running: dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync

    Also is this a VPS or dedicated server? How many players were on when the lag/can't keepup messages start with no plugins?
     
  12. Offline

    blaba

    Thanks for fixing the world, but it wasn't really the problem. When I tried your world, the errors were still there. Now I reconfigured almost everything. I think it was a corrupt file in the GroupManager. Don't ask me what it really was :D

    Thanks 4 your help :)
     
Thread Status:
Not open for further replies.

Share This Page