The server slowly uses more and more ram over a period a week until it finally consumes all memory. Server must be reset in order to start over. The problems may have been happening before 1.5.1 but I failed to notice.
Here's the invocation: java -Xmx1500M -Xms1500M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=2 -XX:+AggressiveOpts -jar minecraft_server.jar nogui
500 MB is left for the OS and 500 MB is left for the ram disk. I did check both and they were within the limits.
Attachments
Comments 5
Yes, the server is vanilla. It is on linux so I usually just use Ctrl+C or maybe it's Ctrl+X, I forget. I just logged in to restore a backup and notice it happened again. After stopping minecraft I noticed still 50% with only a small drop. I believe that maybe linux cache or linux buffer for the disk is getting filled up and not emptying. I will update this page if I find a solution. It is strange because centos is also stock with no extra software except java and minecraft.
It would be ^C. I don't think ^X does anything (check `stty -a`). Alternativly, there is ^\, but don't use that.
Linux does cache disk writes, but IIRC that memory is used by the OS. However, sync(1) will flush the buffers to file. I think there might be an option for mount to bypass the caching, but I don't think that is the problem.
Can you tell us what each of the parameters on the cmd line does?
The next time that you see the huge memory usage, please run `ps faux > ~/memory.txt`, and upload the memory.txt file from your home directory. So I can confirm if it is indeed MC or not.
Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
Is the server vanilla?
I would say to F3+C crash it, but I don't know if it is possible (or how to do it) on a server.