Memory errors when running Bukkit.

Discussion in 'Bukkit Help' started by Nunnsy, Nov 23, 2011.

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

    Nunnsy

    Hey everyone,

    I've been running a Bukkit server for quite some time now but I've changed hosts because of prices.
    My server was on a Xen VPS but is now on a OpenVM VPS. This has caused some problems.

    When running a Vanilla server, these errors don't show.
    I have tried to make swap ram but I can't do it because "The operation is not permitted".
    I have 4GB of RAM and 2 CPU cores running at at 4000mhz each.
    Java is updated to the latest possible.
    Running on CentOS 5.4, 64 bit.
    The server runs fine, but the CPU usage is about 70% and RAM usage is about 4% which seems a bit odd.

    For some reason my murmur server (For mumble) doesn't work with the new VPS either.

    This is my starting command:
    Code:
    java -server -d64 -Xmn512M -Xms1G -Xmx3G -XX:PermSize=128m -XX:+UseConcMarkSweepGC -XX:ParallelGCThreads=6 -XX:+CMSParallelRemarkEnabled -XX:+DisableExplicitGC -XX:MaxGCPauseMillis=500 -XX:SurvivorRatio=16 -XX:TargetSurvivorRatio=90 -XX:+UseAdaptiveGCBoundary -XX:-UseGCOverheadLimit -Xnoclassgc -XX:UseSSE=3 -jar Bukkit.jar nogui
    This is the error:
    Code:
    Rebooting
    174 recipes
    27 achievements
    java.io.IOException: Cannot run program "sh": java.io.IOException: error=12, Cannot allocate memory
            at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
            at java.lang.Runtime.exec(Runtime.java:610)
            at java.lang.Runtime.exec(Runtime.java:483)
            at jline.UnixTerminal.exec(UnixTerminal.java:297)
            at jline.UnixTerminal.exec(UnixTerminal.java:282)
            at jline.UnixTerminal.stty(UnixTerminal.java:273)
            at jline.UnixTerminal.initializeTerminal(UnixTerminal.java:77)
            at jline.Terminal.setupTerminal(Terminal.java:75)
            at jline.Terminal.getTerminal(Terminal.java:26)
            at jline.ConsoleReader.<init>(ConsoleReader.java:191)
            at jline.ConsoleReader.<init>(ConsoleReader.java:186)
            at jline.ConsoleReader.<init>(ConsoleReader.java:174)
            at net.minecraft.server.MinecraftServer.<init>(MinecraftServer.java:80)
            at net.minecraft.server.MinecraftServer.main(MinecraftServer.java:565)
            at org.bukkit.craftbukkit.Main.main(Main.java:134)
    Caused by: java.io.IOException: java.io.IOException: error=12, Cannot allocate memory
            at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
            at java.lang.ProcessImpl.start(ProcessImpl.java:81)
            at java.lang.ProcessBuilder.start(ProcessBuilder.java:468)
            ... 14 more
    10:44:31 [INFO] Starting minecraft server version 1.0.0
    10:44:31 [INFO] Loading properties

    Any help with this would be greatly appreciated.
    - Nunnsy
     
  2. Offline

    Coelho

    Try without UseLargePages: I believe that is your issue.
     
  3. Offline

    Nunnsy

    The error still occurs.

    EDIT: It resolved the first error, I've left the rest in the first post.
     
  4. Offline

    Coelho

    Your command without large pages works fine for me with the latest build. What java version and craftbukkit version are you running?
    Code:
    java -version
    
     
  5. Offline

    Nunnsy

    Here's what happens when I run "java -version":
    Code:
    [root@V-3018 Minecraft]# java -version
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine.
    And I'm running build 1493.

    I do think this is about RAM and swap.

    Also, I'm running the VPS on OpenVM, not sure about you?


    Thanks for your help so far.
     
  6. Offline

    Coelho

    It is very weird to not even be able to type "java -version"... Try reinstalling java using:
    Code:
    yum remove java
    yum install java
    
    or I think:
    Code:
    yum remove openjdk
    yum install openjdk
    
    (I don't currently have a CentOS workstation to be able to verify this...)

    On another note, my desktop that I had tested this on is running Ubuntu 11.04.
     
  7. Offline

    Nunnsy

    No luck.
     
  8. Offline

    EmperorXing

    run Build #1467 and see what happens. Also, delete your run.bat, and create a new one. It should work.
     
  9. Offline

    Nunnsy

    I don't see the point of that. I don't have a "run.bat" as I have clearly stated I run CentOS not Windows. Also, those variables in the shell file optimize the system. I have tried a clean run and it has the same errors.

    There was nothing to say the build would be different. I tried it, nothing.
     
  10. Offline

    EmperorXing

    Well then... I don't know what to say.
     
  11. Offline

    Nunnsy

    Thanks for the thought, but I think this is something to do with the virtualisation.

    No other suggestions?

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

    XLawless BaronX

    This will usually happen since it is a VPS what i suggest is to stop the server VIA SSH and let the server comprehend on whats happening or catch up then boot it up but it may be because its a VPS and it has a high CPU usage it happened to me once so now i have a Dedicated server i7 6 core Debian 6 64-Bit 24 Gig of ram and 100 mbps 2 TB HDD much more for $105
     
  13. Offline

    Nunnsy

    Nice dude!

    I was thinking of going dedicated and I know where I'll go, it's just my server survives on donations. (Self-funded project)
    Hopefully... haha
     
Thread Status:
Not open for further replies.

Share This Page