[MC-851] Memory Leak Created: 27/Oct/12  Updated: 04/Aug/17  Resolved: 22/Nov/12

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.2
Fix Version/s: Minecraft 1.4.5

Type: Bug
Reporter: Brian Neal Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by MC-1125 Memory Leak when Running Server Resolved
is duplicated by MC-2917 Minecraft server out of memory when a... Resolved
CHK:
Confirmation Status: Unconfirmed
Game Mode: Survival

 Description   

After running a 1.4.2 server for a while i have to restart the server cause the memory reached 100% on a 4 gig server with 8 people on it



 Comments   
Comment by Pixelgraph [ 27/Dec/12 ]

Rather odd how it works but anyway it just the way it is. I was just a little worried java would use up all my memory and keep shutting itself down.

Comment by Kumasasa [ 27/Dec/12 ]

That's how the allocator of Java works: Freed memory is not really freed, only when the amount of maximum memory is reached, the gargabe collector kicks in.
I see when -Xmx512m is given, it will allocate > 1GB.
But nevertheless, that all is not a Minecraft isssue, that's some OS and/or Java issue.

Comment by Pixelgraph [ 27/Dec/12 ]

But when I start the world task manager is well under 1 gb. And even when I allocate minecraft with only 500 mb task manager shows it going over that limit.

Comment by Kumasasa [ 27/Dec/12 ]

The task manager shows the amount of memory assigned to the JVM, which is always 1GB, see the command line paramter -Xmx1024m

Comment by Pixelgraph [ 27/Dec/12 ]

This issue still does not seem to be fixed. Minecraft's debug screen shows Minecraft using about 400 mb but in the windows task manager it shows it using up over 1 gb.

Comment by Kumasasa [ 22/Nov/12 ]

Ok, thanks a lot for the update.

Comment by migerh [ 22/Nov/12 ]

After one week the server still runs. The memory consumption is slightly higher than with 1.4.2 but it is stable and the last 7 days it did not exceed 600MB.

Comment by migerh [ 16/Nov/12 ]

I'm still testing and watching my server. Right now it looks like memory usage is increased in 1.4.4 compared to 1.4.2 but it doesn't look like there's something leaking. I'll keep an eye on my server and will update next weekend.

Comment by Kumasasa [ 16/Nov/12 ]

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.

Comment by migerh [ 15/Nov/12 ]

Possible duplicates: #1125 #2917; I'm commenting here because it was the oldest report I could find.

I'm running the minecraft server for two players max on FreeBSD 9.1 with 4GB RAM. I tried several JVM: diablo 1.6.0, sun jdk 1.6.0, openjdk7, all compiled from the ports system. The server is currently running with jdk1.6.0 using

JAVA_HOME=/usr/local/jdk1.6.0 java -Djava.security.egd=file:/dev/random -Xmx2048M -Xms512M -jar minecraft_server.jar nogui

Before Minecraft 1.4.2 I used weekly snapshots and every 3-4 days the server would crash with an out of memory exception. This bug was finally fixed with 1.4.2 and once I updated the server to 1.4.2 it ran without a single restart for 3 weeks. With 1.4.2 the server would consume ~150-200MB RAM while no one is logged in. Since yesterday I'm running 1.4.4 and the server is showing similar symptoms as it did with pre-1.4.2 versions: After a fresh start consuming at least 300MB RAM, when two people log in it jumps up and won't go below 500MB after they logged out. But I guess it's too soon to draw any conclusions.

Comment by Brian Neal [ 08/Nov/12 ]

Well if you say it should be fixed ill take your word on it.

Comment by Kumasasa [ 07/Nov/12 ]

Can anyone confirm this issue ?
That was a bug in 1.4.1, but should be fixed in 1.4.2

Generated at Sun Jan 12 11:52:26 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.