[Fix] AutoRestart (At memory leaks) [1.2.3-R0.2]

Discussion in 'Bukkit Tools' started by Thunderspike, Mar 18, 2012.

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


    I did this plugin due heavy memory Leaks, if the RAM goes lesser than 70 mb this plugin stops the server, this plugin creates a statistic over 10 seconds to compare to the 70 mb.

    At this point there is nothing configurable, and there are no commands.
    It wasnt meant to publish this plugin, so there wont be updates, aslong as evrything works fine.

    To automaticaly restart the server, you need a start script that does so,
    (linux) shell script
    while [ 1 ]; do
    echo Starting Minecraft Server ...;
    java -Xmx1890M -Xms1890M -jar ./craftbukkit.jar nogui
    sleep 1
    echo Restarting Server ..;
  2. Offline


    The script does it all, no plugin needed...
    I jave a very simular but more reliable shell script for this, i do recommend such a script, i have 100% uptime :D
  3. Offline


    Please read the Submission guidelines.
  4. Offline


    The problem is: if you get a out of memory, minecraft still runs, just doesnt respond, by this plugin the server stops and there are no rollbacks.
  5. Would you be so kind to share this wonderful script with the rest of the Bukkit community? :)
  6. Offline


    I love brewing my own stuff and acting like it's a secret but here you go:
    touch .autorestart
    while [ -f .autorestart ]; do
    java -Xmx1024M -Xms1024M -jar craftbukkit.jar
    It's a Linux shell script if you didn't know :p
  7. Awh too bad I'm not hosting my server on Linux..
    I'm stuck with using Windows, which I love SO much /sarcasm
  8. Offline


    Quickly wrote this for you:
    @echo off
    title Uncrashable server
    java -Xmx1024M -Xms1024M -jar craftbukkit.jar
    goto startserver
    enjoy, just hit the close button to terminate
  9. Ow thanks! :) What do you mean exactly with hitting the close button to terminate?
    (haven't tested your little script yet ;) will try it tomorrow. :) But I was just wondering. Does is make like multiple windows after a crash?)
    EDIT: Just tested the linux script on my MacBook and I think I know what you mean. When I do 'stop' the server just reboots. :)
    Hit close to shut down the server, right? This doesn't corrupt any files? :confused:
  10. Offline


    Warning! Do not use this script on virtual machines! Our hosting's host system of the Virtual Machine crashed because of it! Only use on dedicated and personal servers!

    Back to topic:
    Windows has a shutdown hook, in Windows, just hit close.
    Linux does not have one, delete the file called ".autorestart" and /stop the server if you're on linux :)
    I discourage this script, we are writing a C launcher instead but I won't give it out, sorry.
  11. Oh right, that's too bad I guess.. :O
  12. Offline


    my script does the same, its needed for the plugin, but the problem as always is: if the server has out of memory the programm doesnt stop, it just stops working but still is alive and doesnt get restartet
  13. Offline


    You should get rid of the "( )" and replace it with a "-" before the desc. in the title.
  14. Offline


    Bukkit already does that -.-
  15. Offline


    Moved to Bukkit tools as it isn't a plugin in itself.
Thread Status:
Not open for further replies.

Share This Page