Jump to content

Server memory leak


darkphan

Recommended Posts

There appears to be a memory leak that causes our server to crash after an extended period of time. I have tried to schedule restarts when nobody is on to work around the problem (which is pretty rare, this is a fun pack and the folks on the server love to play it, heh). For those that will suggest "just give it more RAM",that is not the issue, we have a 5gb server, and, as you can tell from the included crash logs, that is being specified in the java start up parameters.

 

http://pastebin.com/jTdPZ8ex
http://pastebin.com/TuBrPnj9
http://pastebin.com/TA8fkZNz

Link to comment
Share on other sites

In two of your crash reports, It appears that ProjectRed is causing your memory leak. I am going to assume the other one is caused by the mod but happened to trip a vanilla method when space ran out.

at mrtjp.projectred.transportation.TableUpdateThread$.add(routingthreads.scala:14)

I would suggest considering removing the mod, and reporting the issue to the mod author. Sounds like they aren't properly cleaning up their Objects ;)

Link to comment
Share on other sites

Also your -Xms setting should always be half of your max -Xmx. Its bad practice to force it to allocate the full 5GB. Set the minimum to hlaf and if it needs it to, it has the space to grow. 

Link to comment
Share on other sites

Wouldn't those errors just indicated that Project Red was trying to acquire more heap memory at the time, rather than saying the mod itself has a memory leak?

 

I have a small server with similar issues that will run out of memory after a couple days of uptime (Even with nobody logging in) also running Linux and the oracle Java VM.  My problems didn't start showing up until either 1.0.8 or 1.0.9 I didn't have the issue with 1.0.5, so I wonder if it's one of the two new mods added around then, or an updated mod.

Link to comment
Share on other sites

Thats what a memory leak is, when you allocate object references without properly dealing with after they are no longer needed. They just sit and use up space instead of being properly garbage collected.

 

We've noticed that ProjectRed has been having some issues lately so we've been keeping our eye on it.

Link to comment
Share on other sites

Also your -Xms setting should always be half of your max -Xmx. Its bad practice to force it to allocate the full 5GB. Set the minimum to hlaf and if it needs it to, it has the space to grow. 

 

Unfortunately those are the settings that are set by Cubedhost so I can't adjust them.

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...