mojira.dev
MC-38552

Server fills allocated memory and results in severe lag.

Server reached maximum memory of 6GB allocated and started lagging severely, overloaded running like 50000ms behind. This continued even when no players were online.

Related issues

Attachments

Comments

migrated
[media][media]
kumasasa

Please attach the server.log

CosmicVoyager

The log is many hours long. Start at the end for the longest lag.

kumasasa

How do you see the server is running out of memory ?

The "can't keep up!" messages are occuring already shortly after the start of the server:

[08:31:36] [Server thread/INFO]: Starting minecraft server version 1.7.2
....
[12:25:01] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 3378ms behind, skipping 67 tick(s)
CosmicVoyager

In my system monitor it shows that all of the 6GB allocated are being used.

CosmicVoyager

"The "can't keep up!" messages are occuring already shortly after the start of the server:"

So that should not be happening at all? I thought the 50 second lag alter on was because it reached max memory.

So I should file a bug report about getting any overload messages?

kumasasa

Please attach the command line for the server

Shaun Reynolds

I am seeing a similar issue on my server. I'm running version 1.7.2 and I'm seeing overly large memory usage.

We have been playing without trouble for a week, and then someone started exploring the nether. Immediately the memory usage shot up to all of the ram on the server (3 gigs) for only 3 people logged in and standing in the same house.

We tried restarting the server and logging back in, I can watch top as we log in. The memory usage skyrockets to the maximum available as soon as the three of us log in.

Two of us were able to play for a few minutes with the ram usage at a 2-3 hundred megabytes, then when the third person logged in it was instantly 3 gigs.

The logs don't show anything unusual other than the "can't keep up" messages that result from running out of ram.

This is the command as run through init.d.

java -Xmx2048M -Xms2048M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=1 -XX:+AggressiveOpts -jar minecraft_server.jar nogui

Marc van der Kamp

I noticed that the last versions (probably started at 1.7.2), the server keep saving region files every minute or so where nobody is active anymore. When about 40 or 50 files are open, the server is no fun to play on anymore.
The stop command takes serious time then, but it's worth to restart 🙂


Mac OS X 10.9.1

java version 1.6.0_65

Talven81

OK I've noticed this on my server as well, and was trying to identify the issue however have been unsuccessful (thought it was an issue on my end until I saw this report). Clearing mobs (/difficulty 0, /difficulty 3) seems to help the lag but does not resolve the issue. At this time only known temporary fix is to restart the server.

START "MineCraft Launcher" /HIGH "C:\Program Files\Java\jre7\bin\javaw.exe" -server -Xmx4G -Xms4G -XX:+UseParNewGC -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:ParallelGCThreads=2 -XX:MaxGCPauseMillis=100 -XX:+AggressiveOpts -jar "%CD%\minecraft_server.1.7.4.jar"

2 days uptime
Players logged in during uptime: 3
Simultaneous players: 2
RAM usage at 2800MB with no players online.

Possibly Related:
MC-42088
MC-38160

Talven81

OK I just tried something and it seems to help (initially will have to test over time). I added -Xincgc to my java command line. Instead of RAM jumping from 300MB (no players fresh start) to over 1GB with one player, now it's staying around 500MB. See if this helps any.

START "MineCraft Launcher" /HIGH "C:\Program Files\Java\jre7\bin\javaw.exe" -server -Xmx4G -Xms4G -Xincgc -XX:+UseParNewGC -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:ParallelGCThreads=2 -XX:MaxGCPauseMillis=100 -XX:+AggressiveOpts -jar "%CD%\minecraft_server.1.7.4.jar"

Talven81

I am still doing additional testing, sadly this is something that takes a while of server uptime to test. The above Java command does indeed keep the RAM usage lower, however over the period of about 24hrs I am still seeing a slow climb, but nowhere near what it used to be.

galaxy_2alex

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. If this has been done, we can reopen the issue.

Keep in mind that the "Resolved"-Status on this ticket just means "Answered", and that we are waiting for further information on whether this issue still exists or not. We will reopen it as soon as the requested information has been deliviered.

user-f2760

This ticket is incomplete without the requested information, no response has been received within a reasonable time and we are assuming the issue has been resolved. If you are still experiencing this issue, we can reopen it at your request.
Please review the guidelines before reporting issues.

CosmicVoyager

(Unassigned)

Community Consensus

high, lag, ram, server, usage

Minecraft 1.7.2, Minecraft 1.7.4

Retrieved