Jukken

Another problem, this time memory

Recommended Posts

Server has been running fine for years. Now it uses ram like crazy...and ideas?

It's a 2k server and used to make use of 3 - 4 GB. Now it goes crazy.

 

Been trying different java memory settings. All eventually ends in server shutdown.

Server has 24 GB ram installed.

 

Server log

Share this post


Link to post
Share on other sites
2 hours ago, Jukken said:

Server has been running fine for years. Now it uses ram like crazy...and ideas?

It's a 2k server and used to make use of 3 - 4 GB. Now it goes crazy.

 

Been trying different java memory settings. All eventually ends in server shutdown.

Server has 24 GB ram installed.

 

Server log

 

Could it be that you are running 2 servers on this machine?

Share this post


Link to post
Share on other sites
6 hours ago, Finnn said:

Run the server with bigger java heap space setting?

 

It used to run fine, using about 3-4 GB setting.

Now I use 18 GB setting, and it keeps running out. There must be something odd going on.

Share this post


Link to post
Share on other sites

Nothing odd going on. If you give Java More memory it will use the extra memory.

Share this post


Link to post
Share on other sites
10 hours ago, Sklo:D said:

Nothing odd going on. If you give Java More memory it will use the extra memory.

I'm having the same problem, I think (if I understood the OP correctly).  How do I give Java more memory?

Share this post


Link to post
Share on other sites
11 hours ago, Sklo:D said:

Nothing odd going on. If you give Java More memory it will use the extra memory.

 

Yes, but crashing from out of memory? It used to work fine with low setting (5GB)...now it runs out with 18GB.

Share this post


Link to post
Share on other sites
2 hours ago, Jukken said:

 

Yes, but crashing from out of memory? It used to work fine with low setting (5GB)...now it runs out with 18GB.

 

You are crashing without of memory?

 

Pls post the following line from the modlauncher startup:

%JAVA% "-Dworkdir=%CD%" "-Djava.library.path=%CD%\nativelibs" %LOGGING% -Xmn256M -Xms512m -Xmx2048m -XX:+OptimizeStringConcat -XX:+AggressiveOpts -jar modlauncher.jar  %*

Share this post


Link to post
Share on other sites

From the log when the server starts to shut down:

[12:19:33 AM] SEVERE com.wurmonline.server.Server: Java heap space
java.lang.OutOfMemoryError: Java heap space
	at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57)
	at java.nio.ByteBuffer.allocate(ByteBuffer.java:335)
	at com.wurmonline.communication.SocketConnection.<init>(SocketConnection.java:116)
	at com.wurmonline.communication.SocketServer.tick(SocketServer.java:128)
	at com.wurmonline.server.Server.run(Server.java:2556)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)

[12:19:37 AM] INFO com.wurmonline.server.Server: Shutting down at: 
java.lang.Exception

 

This is the setting I use now...server stays up longer - takes more time before the server runs out of memory:

 

%JAVA% "-Dworkdir=%CD%" "-Djava.library.path=%CD%\nativelibs" %LOGGING% -Xmn12000M -Xms18000m -Xmx20000m -XX:+OptimizeStringConcat -XX:+AggressiveOpts -jar modlauncher.jar  %*

Edited by Jukken

Share this post


Link to post
Share on other sites

2k server shouldn't be using more than 2-3 gigs of ram, if you get to 10+ you have a memory leak in one of your mods (or vanilla... but less likely since that would affect everyone).

 

If you can get a heap dump with jmap or jvisualvm

 

Otherwise try disabling mods till you find which one causes it

Share this post


Link to post
Share on other sites
54 minutes ago, bdew said:

2k server shouldn't be using more than 2-3 gigs of ram, if you get to 10+ you have a memory leak in one of your mods (or vanilla... but less likely since that would affect everyone).

 

If you can get a heap dump with jmap or jvisualvm

 

Otherwise try disabling mods till you find which one causes it

 

I doubt that this is a modding issue. It is a configuration issue.

 

 

 

6 hours ago, Jukken said:

From the log when the server starts to shut down:


[12:19:33 AM] SEVERE com.wurmonline.server.Server: Java heap space
java.lang.OutOfMemoryError: Java heap space
	at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57)
	at java.nio.ByteBuffer.allocate(ByteBuffer.java:335)
	at com.wurmonline.communication.SocketConnection.<init>(SocketConnection.java:116)
	at com.wurmonline.communication.SocketServer.tick(SocketServer.java:128)
	at com.wurmonline.server.Server.run(Server.java:2556)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)

[12:19:37 AM] INFO com.wurmonline.server.Server: Shutting down at: 
java.lang.Exception

 

This is the setting I use now...server stays up longer - takes more time before the server runs out of memory:

 

 %JAVA% "-Dworkdir=%CD%" "-Djava.library.path=%CD%\nativelibs" %LOGGING% -Xmn12000M -Xms18000m -Xmx20000m -XX:+OptimizeStringConcat -XX:+AggressiveOpts -jar modlauncher.jar  %*

 

 

Use this line instead. Should work without any problems. Not 100% sure though, can't look into your server, could be an issue with a mod or something else too. But a configuration issue is likely.

 

%JAVA% "-Dworkdir=%CD%" "-Djava.library.path=%CD%\nativelibs" %LOGGING% -Xmn2560M -Xms5120m -Xmx20480m -XX:+OptimizeStringConcat -XX:+AggressiveOpts -jar modlauncher.jar  %*

Edited by Sklo:D

Share this post


Link to post
Share on other sites

Disabled all mods and used your setting.

The server stayed up a little longer (a week), but run out of memory and shut down anyway :(

Edited by Jukken

Share this post


Link to post
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