Moderator Note
For those still experiencing this problem, please run the following commands while the lag is occurring:
/debug start
wait some time while the lag is occurring
/debug stop/debug report
Once complete, navigate to the debug directory inside the game directory, and attach the resulting profiler and debug report files to this report.
The chunk-loading was addressed in MC-149178 and marked as "fixed" but I beg to differ. The mod comments in that report recommended creating a new report for 1.14.1, so here we go.
Lag is caused by loading chunks, and remains until the server is restarted. This generally takes several thousand blocks of travelling to replicate with a single player online, but can quickly bring a multiplayer server to its knees after just a few hours of standard gameplay.
In all of the following test cases, I am connecting to a remote vanilla server with a vanilla client. The server is hosted on hardware that is entirely separate from the client that is connecting to it.
Case #1
Buffet cave world with mob spawning enabled and 512MB of memory
Video: https://youtu.be/Zosu1BPpl6w
Highlights:
10:15 - See the lag in action (see
)
12:15 - And how it disappears after rebooting the server (see
)
Case #2
Default world with mob spawning disabled and 1GB of memory
Video: https://youtu.be/AaGVQvC1vW4
Highlights:
20:50 - After travelling 16k blocks, the lag does not seem to have appeared (see
)
23:30 - After travelling 20k blocks, the lag has appeared (see
and
[media])
30:50 - The lag persists despite several different methods of attempting to alleviate it
36:00 - After rebooting the server, the lag no longer exists (see
and
[media])
Related issues
is duplicated by
relates to
Attachments
Comments

Please do not mark unreleased versions as affected.
You don't have access to them yet.
Here are some screen shots of chunk loading issues I've been having. Between the enchanting issue and this, the game is almost unplayable. But it does give me an idea for a potion that allows you to see through the ground to find mines/caves...
[media]@dexto Can you (or a mod) please remove the screenshot attachments from the report? This report is about the lag caused by chunk-loading, not the rendering issues, and they are cluttering the attachments section. Thank you.
Also your screenshot should ideally be a link or a thumbnail, and not embedded directly in the comment, as it is taking up the entire screen.
I removed them. What is the defect# for rendering? I didn't embed in the comment, I just used the JIRA attachment feature. Perhaps another defect needs to be submitted for that?
@dexto No worries, JIRA definitely has its own issues. 😉
I'm not sure which report is for rendering specifically, apart from the original MC-149178 which was marked as "fixed" (even though it is very clearly not fixed).
My goal with this report was to limit the scope to the server-side lag that's caused by (whats seems to be) chunk-loading. However it looks like the tracker mods are redirecting traffic from MC-149178 to here, so hopefully it doesn't just turn into the same generic "lag" report we already had.
Edit #1: I left a comment on MC-149178 regarding the distinction between the server-side lag (outlined in this, new report) vs the client-side rendering issue you demonstrated (outlined in MC-149178).
Edit #2: Looks like MC-151084 was intended to be for the client-side rendering, but it got resolved as a duplicate of this report. I think it would be better to have separate reports, even if they seem like symptoms of the same underlying problem.
I noticed that in crash reports from 1.14, ServerChunkCache was reaching upwards of 12000 after only a few hours of playing with less than 10 players online. On 1.13 the ServerChunkCache (in a crash report from August 2018) was only 3480 with 30 players online and the server had been running for quite a few days. Could there be a memory leak here with unloaded chunks failing to be garbage collected?
@luigiofthebakery That sounds like a viable cause, given that we have to load/unload chunks for the issue to occur. I've been running a 1.14 server for a small group of players that's limited to a 17x17 chunk playing area via worldborder, and have had no issues so far... presumably because there is very little chunk-loading occurring.
Do you still have the crash reports, and would you be willing to attach them - or at least the interesting bits - to the bug report?
Does MC-138550 describe your issue?
I think there is some overlap in the symptoms, but the meat of that report is focused on single-player and doesn't necessarily suspect chunk-loading to be the cause. I believe I've narrowed down the culprit of this report to be server-side chunk-loading specifically.
I attached a couple of crash reports and a leak suspects report from eclipse memory analyser of a heap dump I took during the severe lag. In particular for the crash-2019-05-09_02.14.23-server I was disconnected because of a StackOverflowError which makes me think it has something to do with memory use. In order to recreate these issues I was by myself on a local 1.14.1-pre1 vanilla server with 512MB of RAM just teleporting to random locations, waiting for all the chunks to load and then teleporting somewhere else (mob spawning enabled).
Each time I teleport to a new location all the old chunks should unload and be purged from memory when the new ones load, but instead performance progressively degrades. I was using the default render distance (10) which means 21*21 chunks = 336*336 blocks, times 256 for the world height = 28,901,376 total blocks. I'm not sure how chunks are stored in memory but the heap dump shows 206.5/500MB of memory being consumed by what I presume to be chunks leaking memory, given a reasonable estimate of ~2 bytes of storage for each block the memory usage for the chunk cache should be less than 60MB.

There is a difference between memory leaks and objects that simply haven't been garbage collected yet, and if you load too much into memory given the memory limit, it could cause problems that seem like a memory leak but actually are not. So that's a bit tricky to say for sure.

Stack overflow is probably just instance of MC-142590. Not really relevant to discussion.
`crash-2019-05-09_02.14.23-server` is caused by server spending too much time on single tick (it seem to be generating chunks accessed by zombie AI), which is probably end of long chain of delays, maybe caused by server in spending too much time on garbage collection.
Also, in heapdump average memory taken by single chunk is about 20MB - game is storing much more that just blocks. Number of loaded chunks can be increased by lag, since loading and unloading operations are not immediate.
I also confirm that the multiplayer server I dev for has been experiencing these issues. Chunk loading and sever tickrate starts lagging after awhile when chunks are loaded/unloaded, and allocated RAM appears to stay at 100%, until a reboot which fixes it all.
I'd rather not be rebooting every 30-60 minutes
I can also confirm this bug. I run a quaint little server for me, my friends, and my little siblings. Dual-core i5 4th gen laptop. Ran with minimal lag during 1.13.1 days. Now its performance gets progressively worse over the course of an hour or even less until a crash occurs. If I remember I will attach a picture of the server RAM usage – it looks pretty weird, like it rises up to a point, then suddenly drops and begins to rise again, rinse and repeat. I'm not sure if this helps but if anyone has any questions I'd be happy to answer.
This might relate to MC-151674
I was experiencing the same issue. 1.13 was fine, but from 1.14 snapshots through 1.14.2 PreRelease 1 I was experiencing restarts every 30-60 minutes. I ran the commands below from MC-142134 and was able to play all morning without a single restart. Not sure if this is the fix for everyone, but make sure you backup worlds if you attempt the fix below.
In order to fix your existing world, you can try following these steps. Apparently this is just a temporary workaround, so you might need to repeat this once the issue reoccurs again.
Singleplayer: Select world → Edit world → Optimize world → check "erase cache data" → Backup and load
Multiplayer: Start the server.jar
with the following command:
java -jar server.jar --forceUpgrade --eraseCache

Is this still an issue in 1.14.3-pre1 or later?
@[[Mojang] slicedlime|https://bugs.mojang.com/secure/ViewProfile.jspa?name=slicedlime]
Not sure about the prerelease, but definitely still an issue as of 1.14.2. Seems to be that servers don't unload any chunks until memory is nearly full. Between two people with 9 chunk render dist I currently have 2500 chunks loaded, but it seems to stop increasing once memory usage hits about 95%, by which point perf has taken a pretty considerable hit.
Edit: Just tested in prerelease 3. Didn't have my chunk tracking tools but in vanilla I saw the same patterns of memory usage (ie never being freed!)
I am currently in 1.14.3 full release, and the issue still persists, I am also on a server. My issue seems too be that after generating a lot of new chunks quickly (Such as on a horse or flying), the chunks stop loading (Or perhaps load too slow) and when I relog I get the same thing that happens in Arcensoth's video at 23:09 for his Case 2 video (https://youtu.be/AaGVQvC1vW4). The fix adopted so far is just too restart the server.

For any new reporters: please performs same steps as described in https://bugs.mojang.com/browse/MC-138550 ('/debug start', '/debug stop' and '/debug report', then attach results) when encountering this issue.

Important Note: We're shipping a fix for one cause of this in 1.14.4-pre3. It is possible that there are more causes, so if you still get this after upgrading to 1.14.4-pre3 or later, please make sure to generate a new debug report and attach it to this issue.
This is still happening for me in 1.14.4-pre3. I was exploring a new map and it started lagging out, gradually getting worse. It did clear up a bit but then I noticed that there was item and mob lag as well. I have attached my debug logs (debug-report-2019-07-08_17.07.09.zip).

Chunk loading is still an issue.
Game version: 1.14.4 Pre-3
Debug profiling:
Debug report:
Debug report:
Observations: First report was created during profiling, second was created after. Player was in the Nether. Player was walking west from near Chunk(-65, 0) then east from near Chunk(-230, 0). Chunks stopped loading after about 10 minutes. Both debug reports clearly show the loaded chunks around the player are not centred on the player's location. From second report, levels/minecraft/the_nether/entities.csv: player is at (-1638.25, 118.50, 0.48) Chunk(-103, 0). levels/minecraft/the_nether/chunks.csv: "BORDER" chunks are at Chunk(-124,z), Chunk(x,-11), Chunk(x, 11) and Chunk(-102,z).
It's still in 1.14.4 pre-release 4 and when i travel with a villager in my boat on water for some time, my world freezes and chunks stop loading, mobs freezed, commands didn't worked anymore...even trying to exit the world didn't worked, it freezed at "Saving World", i had to restart Minecraft. Mojang i'm begging you to fix chunks related problems because they are killing Minecraft at this point.

@unknown, please provide the debug reports as indicated in the report description.

@unknown, could you please provide a download link for your world?

I have created a dropbox file for my world. I would prefer to share it privately if I can. Do you require all dimensions or just the Nether where I have been doing all the testing?
The original world file was over 3GB so I have had to prune a lot of superfluous region files out of the Overworld and End to get the size down. These removed regions are more than 1024 blocks from the X and Z axes in the Overworld and everything not on the End island in the End. The Nether is untouched because that is where I have been doing my testing.

Just nether should be ok. As for adding the link, there is an option to make comment visible only to certain group, not sure if you can access it (small lock icon in bottom of edit screen).

@Bartosz, There is a lock button, but normal user can lock it to "Users" role or "users" group. We can't set it as visible only for devs, as it could hide comment from ourselve. For normal user it works only for hiding comment from unregistered users.

Using a boatway (a boat on a packed ice road) in the Nether is a quick way of reproducing the bug. Using a boatway, I was able to get chunks to stop loading within a few minutes to obtain the following screenshot (after teleporting to y=119 in my Nether). I travelled 151 chunks.
[media]
Aside from the obvious missing chunks, a careful examination of the screenshot will reveal an anomaly in the Client Chunk Cache and D (render distance). The render distance is 12. This correlates to a minimum value of 441 for the Client Chunk Cache (it would be 625 if not for MC-152198). However, the actual value for the second Client Chunk Cache is actually 252. A lot of chunks are missing because they have not loaded.

Oftentimes the game pretends my FOV is less than what it is and stops rendering some chunks on the edge of my field of view; is this related at all to this issue?

@unknown, See MC-63020.
Can anyone still confirm this in 1.14.4 Pre-Release 6? The developers said they "fixed a memory leak" in this snapshot, and this bug was caused by a frequently occurring memory leak (based on my testing) if i'm not mistaken.

The issue still occurs in 1.14.4 pre-6. Chunks stopped loading after a minute or two while I was using a boat on packed ice. The issue was severe enough to stop a debug profile being generated.
Debug report:
[media]
Please make this issue top priority.
This really drops servers down to the point where only restart can help and it is very easy to reach this bug if couple of players are exploring on the server. The fastest way to reach it is also via Nether if boat highways with ice are used.
Most likely, this issue is not related to memory leak, because on my 1.14.3 server RAM usage is fine and not seem leaking while experiencing this problem.

Another debug profile. Similar to my previous tests: a boat on packed ice in the Nether until chunks stopped loading.
First test: stationary. No chunks are being actively loaded.
Debug report:
Debug profile:
[media]Second test: Travelling in a boat on packed ice in the Nether when chunks stopped loading. After the profiling was completed, the chunks loaded about 20 seconds later.
Debug report:
Debug profile:
[media]Additional remarks: I have a relatively low-powered PC, and this issue seems to happen relatively quickly for me, to the extent that I can get it to start happening within a minute or two using a boat on packed ice in the Nether (using a certain save). Others have mentioned that it takes "some time". I have also seen it in 1.14.3 gameplay. It has taken 10 or so minutes when riding a horse back and forth between two locations, and when walking over the same area it takes even longer. This time to failure is not linear (it is possible to walk a greater distance than boating on packed ice). There appears to be a correlation between the chunk loading speed and the speed of the server. The faster chunks load, the quicker the problem occurs (again, it's not linear, possibly quadratic?), and the slower the server, the quicker the problem occurs.
Can you check if it's still an issue in 1.14.4?
Issue appeared immediately with previous releases including 1.14.4-pre-x
I cannot reproduce this issue in 1.14.4. Server has been up 2 weeks with 2 users playing a few hours a day.
Can confirm in 1.14.4.
Can confirm in 19w42a.

An attachment with a disallowed file extension has been removed from this ticket.
Executable files and documents are not allowed as attachments.
Please attach crash reports, log files and screenshots as they are instead of pasting them into a document.
-- I am a bot. This action was performed automagically! Please report any issues in Discord or Reddit

Is this still an issue in 1.20+? If so, please provide new repro steps and profile reports.