server crash bug

Discussion in 'Bukkit Help' started by Flassher, Jun 15, 2011.

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

    Flassher

    Hey :) i'am here for asking for helt to fic my server lastly i have been playing on my server with like nine players,
    i have a cupple of plugins and those are working just fine :)

    but when i have played on the server for about 15 minuttes the server crashes and evryone need to log out.
    and i'am getting this wierd error: >java.lang.OutOfMemoryError
    20:10:20 [SEVERE] java.lang.OutOfMemoryError
    20:10:20 [SEVERE] at java.util.zip.Deflater.init(Native Method)
    20:10:20 [SEVERE] at java.util.zip.Deflater.<init>(Unknown Source)
    20:10:20 [SEVERE] at java.util.zip.Deflater.<init>(Unknown Source)
    20:10:20 [SEVERE] at net.minecraft.server.Packet51MapChunk.<init>(Packet51
    MapChunk.java:40)
    20:10:20 [SEVERE] at net.minecraft.server.Packet51MapChunk.<init>(Packet51
    MapChunk.java:27)
    20:10:20 [SEVERE] at net.minecraft.server.EntityPlayer.a(EntityPlayer.java
    :225)
    20:10:20 [SEVERE] at net.minecraft.server.NetServerHandler.a(NetServerHand
    ler.java:286)
    20:10:20 [SEVERE] at net.minecraft.server.Packet10Flying.a(SourceFile:126)

    20:10:20 [SEVERE] at net.minecraft.server.NetworkManager.b(NetworkManager.
    java:226)
    20:10:20 [SEVERE] at net.minecraft.server.NetServerHandler.a(NetServerHand
    ler.java:75)
    20:10:20 [SEVERE] at net.minecraft.server.NetworkListenThread.a(SourceFile
    :105)
    20:10:20 [SEVERE] at net.minecraft.server.MinecraftServer.h(MinecraftServe
    r.java:399)
    20:10:20 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftSer
    ver.java:309)
    20:10:20 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(Sour
    ceFile:422)
    20:10:20 [SEVERE] Unexpected exception
    java.lang.OutOfMemoryError
    at java.util.zip.Deflater.init(Native Method)
    at java.util.zip.Deflater.<init>(Unknown Source)
    at java.util.zip.Deflater.<init>(Unknown Source)
    at net.minecraft.server.Packet51MapChunk.<init>(Packet51MapChunk.java:40
    )
    at net.minecraft.server.Packet51MapChunk.<init>(Packet51MapChunk.java:27
    )
    at net.minecraft.server.EntityPlayer.a(EntityPlayer.java:225)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:286)
    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:75)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:399)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)


    any idea why this is comming? please help me :)
    >
     
  2. Offline

    nickrak

    Have you been using a launch script? If so, how much memory are you allocating to minecraft?
     
  3. Offline

    Flassher

    no, i have bought minecraft and using the orignale version.
     
  4. Offline

    Lolmewn

    No, he means how do you start the server. Because your error shows that you have given the server too little memory.
     
  5. Offline

    nickrak

    You should have a bat or sh file used to launch the jar that contains something like this
    Code:
    java -Xmx1024M -Xms1024M -jar craftbukkit-0.0.1-SNAPSHOT.jar
    Xms is the initial size of memory, Xmx is the maximum. If you don't specify, the default is 256M, which is definitely not enough. 1024M is 1gig of RAM and I suggest you give minecraft at least that much.
     
  6. Offline

    Flassher

    ok thanks it works ;)

    sorry, it didn't work, where am i suposed to put that
    Code:
    java -Xmx1024M -Xms1024M -jar craftbukkit-0.0.1-SNAPSHOT.jar[/CODE
    thingy?
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  7. Offline

    nickrak

    Open that in notepad and paste it. minus the [/code.
    Save it as a batch file and double click the batch file to run the server instead of double clicking the jar.
     
  8. Offline

    Flassher

    :S i did not understand anything of that :(
     
  9. Offline

    nickrak

    What operating system are you using?
     
  10. Offline

    Flassher

    i'am using windows xp.

    and i started getting this error like on monday or so

    can it be because of all the Player's i have on the server?

    like my friend and his friend just made thousands of accounts and logged into my server and spammed, is that why?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  11. Offline

    nickrak

    Here's a super simple batch file to give minecraft more ram. Unzip it into your directory with the server jar and use that to launch the server instead of double-clicking the jar. It will give the server a gig of ram instead of 256 megs (Assuming you actually have a gig of ram available).

    Is it nine or thousands? It's hard to help people who change their story in the middle. Nine should be fine with a gig of ram, maybe a little laggy, but not too bad. Thousands would crash even the most powerful of servers.

    Unless your friends are filthy rich, they probably don't have thousands of accounts. Just make sure your online-mode is set to true, and your max-players is set to something reasonable. I think 10 players per gig of ram you give the minecraft server is reasonable. If you don't want your friends spamming your server all the time, you may also want to consider a whitelist.
     

    Attached Files:

  12. Offline

    Flassher

    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine.
    Trykk en tast for å fortsette...

    and i have over 50 gb of free space on the hard disk

    @Echo OFF
    SET BINDIR=%~dp0
    CD /D "%BINDIR%"
    "%ProgramFiles%\Java\jre6\bin\java.exe" -Xmx2000M -Xms2000M -jar craftbukkit-0.0.1-SNAPSHOT.jar
    PAUSE

    Invalid maximum heap size: -Xmx4G
    The specified size exceeds the maximum representable size.
    Could not create the Java virtual machine.
    Trykk en tast for å fortsette...

    Exception in thread "main" java.lang.NoClassDefFoundError: Xmx2G
    Caused by: java.lang.ClassNotFoundException: Xmx2G
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    Could not find the main class: Xmx2G. Program will exit.
    Trykk en tast for å fortsette...

    Code:
    Exception in thread "main" java.lang.NoClassDefFoundError: Xmx2G
    Caused by: java.lang.ClassNotFoundException: Xmx2G
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
    Could not find the main class: Xmx2G.  Program will exit.
    Trykk en tast for å fortsette...
    and evry time this happends my internet closes minecraft closes everything!!! :( i'am so sad :( please just make me a
    Code:
    RUN.bat
    
    File
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  13. Offline

    nickrak

    I sent you a run.bat

    All of those errors are from editing the file to either allocate more memory. You obviously don't have enough memory in your machine to allocate that much. (RAM ≠ HDD)

    It's very difficult for people to help you when you edit their scripts before running them.
     
    dak393 likes this.
  14. Offline

    Liger_XT5

    I just skimmed through this thread, I think his computer may not have enough RAM, not hard drive space.

    Go to "my computer" right click it, go to properties, and it will tell you how much RAM/Memory you have.
     
  15. Offline

    Flassher

    ok there we have the problem i hva e 0.99 gb of RAM xD
     
  16. Offline

    dak393

    lol try changing the ram from 4G (or what ever it is now) to 512M (1/2 a gig) see how that goes
     
  17. Offline

    Liger_XT5

    Glad to be of some help.
     
  18. Offline

    Flassher

    if i deleat evrything on my pc and restart it, will i get more RAM?
    and will it run faster?
    less lagg?
    etc?

    yeah but i want 3-3(1/2) memory on the sverver :/

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  19. Offline

    1lann

    Nope. Sorry but your 1 gb ram PC can't handle 9 players. You'll just have to upgrade to a better ram and use a 64 bit OS perferrably. And don't reformat your computer. It's a bad idea and it won't help/fix anything. Though try closing down some programs running in the background or use ubuntu server.
     
  20. Offline

    Flassher

    but i started getting this problem for a 2-3 weeks ago before that i had like 12-14 player'son the server without any lagg and i played with no lagg either :( and it says someething by Google Crash Hand when the error comes up /:S
     
  21. Offline

    Liger_XT5

    Then Microsoft screwed you over with the recent windows updates. I've had a few MAJOR problems since windows 7 SP1 came out, including not being able to log in normally or safemode. I had to use system repair and go back a couple points to be able to log in again.
     
  22. Offline

    Flassher

    i think i'am reformating my laptop :)

    what is the java code for 4gb? i'am running on a betther pc :)

    like insted of 1024M

    just forget it i fixed it on this computer i just set flight= flase
    and Nether=False

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  23. Offline

    dak393

    The code for 4Gigs is "4G" or even better "4096M"
     
  24. Offline

    Justincase

    Go to your .bat file that runs the server.
    Open it with notepad (you might need to change the file to .txt to do this)
    Your file should look something like this if you're using windows:

    @echo off
    java -Xms1500M -Xmx1500M -jar craftbukkit.jar nogui
    pause

    The numbers i have put in red. Change those to the amount of RAM you want to use. 32-bit java can only go up to 1500 but I think 64-bit can go up to 3000.

    Save this and change the file back to a .bat and run it.

    Open task manager and find java.exe in processes.
    Right click and set priority to high.

    Your server should be running with a lot more RAM allocated.

    Hope this helps. Oh and 1 question if you use more than 10 plugins will your server lag?
     
Thread Status:
Not open for further replies.

Share This Page