Jump to content

[SOLUTION] EXTREMELY COMMON MCPC+ SERVER CRASH


EbearMC

  

3 members have voted

  1. 1. Did you encounter this crash, AND did this help you?!

    • I had the crash, and this cleared it away real fast!
      1
    • I had the crash, and this did nothing...
      1
    • I've never had this crash... What the fu*k are you talking about?
      1


Recommended Posts

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!

Edited by EbearMC
Link to comment
Share on other sites

Hmm, very interesting. I think I may give this a chance. But ClearLagg really won't unload the chunks. That could explain why Opis was telling me that chunks were still being forceloaded even after I ran the unload command. I imagine this doesn't have any detrimental effects to the server correct? Now the dump-chunks setting on deadlock. Does that mean it will unload the loaded chunks when the server stops responding? And what does it mean by dump? Just unload them and then store the info in a log? Or just stores the info in a log?

 

I only ask these questions because in the MCPC.yml it looks like these settings are only under logging which doesn't really seem like it does anything except log the events.

Edited by HalestormXV
Link to comment
Share on other sites

From the MCPC.yml file:

 

# Setting: logging.dump-heap-on-deadlock Default: false   # Dump the heap in the event of a deadlock (helps to debug the deadlock)

# Setting: logging.chunk-load Default: false   # Log when chunks are loaded (dev)

 

 

As HalestormXV noticed, these settings are only logging options, and should have no impact on your server besides helping you find the real cause of the problems.

 

 

Also where are these loaded chunks located? because by default minecraft will keep 441 chunks (21x21) around a player loaded at all times, now I dont use Opis, but I have added the chickenbones chunkloaders to my pack, and when using the /chunkloaders command I can see that mcpc doesn't keep any extra chunks loaded for me.

Edited by Kr0nZ
Link to comment
Share on other sites

I think the Portals2 mod that comes with Attack of the B-Team, forceloads chunks in order to establish the link between two location linked via the portal. I am not sure which chunks Ebear was talking about though.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...