Hey guys!
I, like many of you were experiencing frequent server crashes on my MCPC+ server with many variations of Out of Memory errors. I just found a simple solution!
I realized that when you install MCPC+, the mcpc.yml defaults to keeping ALL CHUNKS loaded NO MATTER WHAT in the "chunk-unload:" section. Set that to true, and your server will be unloading all those unused chunks that it WAS keeping in memory FOREVER... Until the server crashes!
It's as easy as that!
Another few tips would be to set "dump-heap-on-deadlock:" to "True" and "dump-chunks-on-deadlock:" to "True".
These two settings alone may have a good chance of saving your server from a crash, because they'll just get rid of the chunks and heap info if your server is about to crash, and typically, that could free up a LOT of memory last minute before a crash.
I tried ClearLagg, and that says it unloads the chunks, but it DOESN'T! It keeps the chunks loaded, because the MCPC+ files tell it to do so. ClearLagg just runs the check by the server, counts the chunks, and tries to clear them. It says they were cleared, but THE SERVER KEEPS THEM LOADED AND IN MEMORY!
== EDIT (Just this paragraph) == Another thing: you probably should go to your launch perimeters and insert -XX:MaxPermSize=128m. That pretty much doubles the heap size, the normal being only 64m. Really, this alone should cause a big difference, as adding more RAM really will do nothing for this error.
I hope these tips have helped you guys out as much as it helped me, and I hope you all have a great day!
Have fun not crashing!