Severe memory leak

  • Hey everyone,


    I've been running a very small IC2 server for quite a long time but a few versions back running the server started to cause a horrid memory leak the only mods on the server are IC2 compact solar panels and occasionally BC. In under a week of running 24 hours a day I will go from 13% of my 16gigs of ram being used to 98% is there anything I can do about this? thanks in advance

  • might be an foolish help atempt (second time this night)


    try to reboot the server (save all) then restart


    just type
    Stop


    then reboot the server (and your computer while youre at it)


    solves 50% of the problems right away is what i understood from some server owners.

    right, time to get serious...
    i wil be offline for weeks and possibly months at an time. if you have anything to add to an post i made, and would like me to know. you are welcome to pm me, and i wil reply as soon as i am able to do so.

  • Yeah that is what I have to do I was just hoping there was a solution that didn't involve a restart every few days since I work in the oil industry I tend to be gone for 3 weeks at a time and do enjoy logging on to my server as well as for my friends to log on there isn't anyone to perform maintenance

  • Yeah that is what I have to do I was just hoping there was a solution that didn't involve a restart every few days since I work in the oil industry I tend to be gone for 3 weeks at a time and do enjoy logging on to my server as well as for my friends to log on there isn't anyone to perform maintenance


    Configure a bot to do that for you automatically, someone here should have knowledge of how to do it.

  • More importantly, what version were you running? I have had a server with 24/7 uptime for the last few months, going all the way back to 1.71. They all leak over time, but maybe half a gig at most (the server has 4GB so that may have something to do with it). Maybe garbage collection is relaxed with massively expanded max memory for java?

    • Official Post

    Does it actually cause any issues? In my experience Java just noms up the RAM until the OS starts running out then it stops (and actually clears up after itself) and runs as normal. For some reason the JVM only frees up RAM when it is actually running low on RAM.


    Try using a Virtual Box container and limiting it to say 4GBs.

    The incremental Garbagecollector causes issues to some Linuxusers, with Windows it's working flawlessly.

  • Works great for bad laptops that try to run Bukkit servers! I'm running one right now and there's no lag at all! You can change the memory if you need too! Hope I helped! =D

  • as to stopping minecraft with a script in a *nix environment, this should do:

    Code
    sudo -u <username> screen -x minecraft -X stuff "`printf "stop\r"`"


    the sudo is there as cron jobs generally don't run as the intended user.
    requires you start minecraft like this though:

    Code
    screen -S minecraft ./launch_server


    launch_server is just my little bash one liner that starts the server up with the appropriate parameters.