Entities crossing dimensions through nether portal causes tremendous lag
The bug
Every time somebody goes through a nether portal or an entity is sent to another dimension the whole server freezes for 1-2 seconds. The search algorithm for portals seems to be really inefficient.
How to reproduce
Video demonstrating the issue: https://gfycat.com/FriendlyInfiniteGreyhounddog
Linked Issues
is duplicated by26
Created Issue:
entities crossing dimensions through nether portal cause tremendous lag
every time somebody goes through a netherportal or an entity is sent to another dimension the whole server freezes for 1-2 seconds. The search algorithm for portals seems to be really inefficient.
Environment
SP world i5-6600 and 16GB RAM
every time somebody goes through a netherportal or an entity is sent to another dimension the whole server freezes for 1-2 seconds. The search algorithm for portals seems to be really inefficient.Every time somebody goes through a nether portal or an entity is sent to another dimension the whole server freezes for 1-2 seconds. The search algorithm for portals seems to be really inefficient.
entities crossing dimensions through nether portal cause tremendous lagEntities crossing dimensions through nether portal cause tremendous lag
Entities crossing dimensions through nether portal causes tremendous lag
is duplicated by
The bug
Every time somebody goes through a nether portal or an entity is sent to another dimension the whole server freezes for 1-2 seconds. The search algorithm for portals seems to be really inefficient.
How to reproduce
Video demonstrating the issue: https://gfycat.com/FriendlyInfiniteGreyhounddog
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
MC-160233
is duplicated by
is duplicated by
is duplicated by
Thank you for your report!
However, this issue is a Duplicate of MC-117914.
If you have additional information, please add it to that report.
Please search before reporting, as it's likely that one exists already.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki
Thank you for your report!
However, this issue is a Duplicate of MC-117914.
If you have additional information, please add it to that report.
Please search before reporting, as it's likely that one exists already.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki
This issue has been reported and maintained in MC-117914
It's better to focus our efforts on reporting the same issue on the same ticket. Even if the issue is worse in 1.14, fixing it will mean it will be no longer be an issue at all, no matter from what version you came from. Moreover, Mojang has recently started to track MC-117914, which means they may fix it before full release if they have the time.
I Really Enjoy This Game. But At One Moment I Stopped It And Look Around For Bugs That Need To Be Fixed. And I Saw Hundreds And Hundreds.
Here Are Some Examples.
No item pickup sound when a villager picks up an item. MC-140174
Bow with Flame Enchantment does not Activate TNT when Hit on the Top. MC-148165
Name of the enchanted book is lost after removing its enchantments in a grindstone. MC-148529
Villagers can get hit by their own firework. MC-147013
Trader Llamas don't attack Zombie, Drowned, Husk and Zombie Villager. MC-146805
Entities crossing dimensions through a nether portal causes tremendous lag. MC-117914
Pillager Outposts don't generate in snowy biomes. MC-147880
A lot of Village Structures are not generating naturally despite having a Jigsaw Block. MC-147989
Some blocks still show air around them when surrounded by water/can not be waterlogged. MC-125351
I Hope You Fix Them By The Time Minecraft 1.14 Is In Full Release!
I have experienced this (or a similar issue) in single player, I needed to wait about three minutes for the Nether to load in. This did not happen in previous versions, and MC-117914 was created a few years ago. I therefore believe that this issue is separate from MC-117914 and this ticket should be reopened.
However, I haven't been able to reproduce this issue in any way while /debug was active. We need that debug file in order to prove that this is a new issue. If anyone who is experiencing this issue could attach a debug file generated by that command while the issue occurs, that would be very appreciated.
[Mod] violine1101 Mojang is currently aware of this issue and they answered that they are currently trying to improve portal code.
And I have posted a profiling dump for this issue in ticket MC-117914. And that's the ticket that has been directly addressed to Mojang. If fact, solving this issue for 1.14 means the old one will implicitly be fixed as well. The main goal was to attract Mojang's attention about the issue, which is done for now.
It is already reported in MC-117914.
I don't think this is a duplicate. The game works fine (45 fps is good for my computer), the only thing affected are the chunk updates. MC-117914 talks about an FPS drop.
Duplicate of MC-117914
I noticed 1.14 and 1.13 are more resource demanding than 1.12 and before. But I mostly don't experience this high ms tick issue under normal survival gameplay.
I have a 8x3.5Ghz CPU, 32GB RAM, and SSD. My JVM arguments follow the recommendations for optimal garbage collection (not endorsed by Mojang, use at your own risks). My view distance is currently 8.
The only significant and recurring circumstance when I experience this issue is right on time whenever someone uses a Nether Portal MC-117914.
The last cause of this issue seems to be correlated with traveling from the Nether. Nether portals are known in 1.14 for causing a massive amount of server lag when finding portal location. MC-117914
May this be in any way affecting the lightning processing.
Duplicate of MC-117914
Duplicate of MC-117914
Duplicate of MC-117914
Duplicate of MC-117914
Thank you for your report!
We're actually already tracking this issue at MC-117914, so we will resolve and link this ticket as a Duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki
If a portal has been created that hasn't had an exit portal generated by the player yet, and an entity goes through it - first of all it creates a spike in MSPT by several hundred, (MC-152635 and MC-117914) - and the entity cannot travel through.
The problem starts when the player travels through and loads up an exit portal and then travels back again. When the SAME entity is pushed through the portal again it once again causes a lag spike but the entity will not go through, even though an exit portal has been generated. Other entities who have not been pushed through the portal before the exit portal has generated will be able to pass into the other dimension. I have waited the cooldown time, tried breaking the nether portal, and even re-logging but the offending entity will not pass through.
Thank you for your report!
We're actually already tracking this issue in MC-117914, so I resolved and linked this ticket as a duplicate.
However, that ticket has already been resolved as Fixed. The fix will arrive in the next version or is already included in the latest development version of the game.
If you haven't already, you might like to make use of the search feature in the future to see if the issue has already been reported.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki
Thank you for your report!
We're actually already tracking this issue in MC-117914, so I resolved and linked this ticket as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature in the future to see if the issue has already been reported.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki
Thank you for your report!
We're actually already tracking this issue in MC-117914, so I resolved and linked this ticket as a duplicate.
However, that ticket has already been resolved as Fixed. The fix will arrive in the next version or is already included in the latest development version of the game.
If you haven't already, you might like to make use of the search feature in the future to see if the issue has already been reported.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki

casually going with my llama caravan trough a portal from the nether to the overworld already lags my singleplayer pretty hard
Could be partwise caused by
MC-116279. Is there a portal in the overworld at the corresponding position?Additionally the fact that portal entries are removed from the cached portal position map after not being used for 300 ticks (if world time % 100 == 0) is probably not beneficial at all.
There was a portal on the overworld side. We notice it all the time during normal gameplay. Somebody goes through a portal -> lag spike for 1-2 seconds.
This is a really terrible performance issue. I really hope there will be a fix soon.
If I understand it correctly the main issue is when going from the nether to the overworld.
1) The caching of portal positions that are done uses the destination coordinates as key for the cache. But since the floating point values from the nether position is multiplied with 8, the resulting destination may be 8 different value in the overworld from each portal block in the nether. The cache values are deleted after 300-400 ticks if not reused. My suggestion: the cache key needs to be based on the portal block that is entered rather than the destination. Increase cache time by a factor of 2 or 3, or only update the cache when portals are created/destroyed.
2) When there is no cache hit, a full search is performed from -128 to +128 on both x and z axis and the full height of the world. That is a lot of blocks to scan for a portal. My suggestion is to improve the scanning by searching in order of distance to the center point. Once a portal block has been found, the search can be terminated and thus not all blocks needs to be scanned.
If you look into the code via MCP, the relevant class is net.minecraft.world.Teleporter and methods placeInExistingPortal() and removeStalePortalLocations().
Nicklaus Ekstrand is right, I think. But there is my solution:
1) Cache the coordinates of destination portal as long as chunk is loaded. This will already resolve laggy portal issues.
2) Search for nether portal blocks in order of distance. This can be made by first looking in chunk where estimated point is and loading more chunks if needed. This will lower initial lag.
3) Clear cache of neighbor portals at destination dimension when new portal is created/destroyed at source dimension. This will resolve leftover issues.
Traveling through portals overall isn't optimized and it is very laggy / resource hungry sometimes, especially in multiplayer servers.
The whole server notices clearly when any entity teleports through portal, even if the chunks are pre-generated and saved (you've traveled many times before and loaded the terrain around)
This is very big and annoying "leak" / issue, in fact.
I think "some sort of" solution to this can be saving the portals info (The Nether Portal's coordinates to the current chunk/s where the Overworld Portal is and the same thing on the other side). This may be tricky, but it can be twisted / modified in some way so that the bug / issue can be fixed more-reliably.
Suggested fix: Store output xyz of nether portal in blocknbt data - like end-gateways. If exit portal block is broken - search for new exit. Lagfriendly - search only for one block most of the time. Also useful for mapmakers and serveradmins - setting output xyz far away with commandblocks.
Does this still affect the current versions of Minecraft? (1.12.2, 1.13-pre3). If so, please update the ticket accordingly.
Confirmed for 1.13.1.
Can confirm for 18w44a with even more severe lag than for stable versions.
Can confirm for 18w45a too. The server can take several seconds before finding a linked portal, although not sure if it is the cause of global lag or if the lag is caused by the constant busy-waiting CPU load as described in https://bugs.mojang.com/browse/MC-138071.
Still an issue for 18w46a and for 1.14 snapshot this might be related to https://bugs.mojang.com/browse/MC-138114.
Also when mobs are going through any Nether portal it causes https://bugs.mojang.com/browse/MC-138919.
Can confirm for 18w47a
This issue does not occur when the chunk on the other side of the portal is marked for force loading (and after having actually loaded the force loaded chunk once). Although forceloading is not a solution, but it helps to understand what is going on.
Can confirm for 1.14-pre2.
Here are simple steps on how to reproduce:
You will notice the tremendous amount of lag, which is only caused by the portal. If I tp to the Nether using /execute in the_nether command, I don't have this issue.
I followed those steps on a 8x3.5Ghz with 16Gb allocated and made a debug profiling to track the cause of the lag: I joined the whole report but here are the highlights:
// This is approximately 9.43 ticks per second. It should be 20 ticks per second [00] tick - 58.99%/58.99% [01] | connection - 91.24%/53.85% [02] | | entityBaseTick - 99.59%/53.63% [03] | | | portal - 99.97%/53.62% [04] | | | | placing - 99.91%/53.57% […] [00] nextTickWait - 41.01%/41.01%So this means I took some idling time to start/stop the profiler (nextTickWait), and the rest of the time I was stuck in the loading terrain screen. The main consequence of this issue is one player stuck a portal transition will make the server stops ticking for any other player who is playing on the same world at the same time.
Can confirm for 1.14-pre3.
I was told my ticket (https://bugs.mojang.com/browse/MC-148438) was a duplicate of this one that was created all the way back with version 1.11.2
I play on a lot of servers, this problem is FAR worse in 1.14 snapshots and pre-releases. That's why it took me this long to report it, as I'm used to basic lag when people switch dimensions using a portal. It reduces the TPS quite a bit, but only for 1-2 seconds.
Now in 1.14, it not only drops the TPS, but stops it out right. Now, once a player finishes switching dimensions, everyone else on the server will revert to 2-3 seconds ago, full on rubber banding. Blocks all get replaced, and players return to the position they were at when the player entering the portal first started switching dimensions. I run a lot of servers, I've never seen anything this bad before.
Can confirm for 1.14-pre4.
Can confirm for 1.14-pre5.
The fix to Nether portals only fixes the transportation of several entities at the same time with the same portal, but a random transportation can still freeze the server for times from 2 to 8 seconds.
The same profiling as described above still applies.
Video covering this topic:
https://youtu.be/nSRA3fd35og
Possible solution: adding blockdata of exit coords to portal blocks. Entering portal block without exit coords or when exit coords are no longer valid (destroyed portal) will cause searching for new exit location. This way only portal changing will cause lags.
Another solution: Keeping nether portal block coords similar to POI of villagers - in separate structure. This way only those files need to be checked and searching would be sped up significantly.
Can confirm for 1.14.
In 1.14, this only appears to happen when entities are going from the nether to the overworld, not the other way around...
limaaaaaaaa That's probably because the height limit in the Nether is twice less as the Overworld, so the game has to check twice as less blocks for finding portal position. But the lag is present in both ways at a different scale.
I've been kicked from Realms going both ways through nether portals and it happens around 40-50% of the time.
Can confirm for 1.14.1-pre1.
Can confirm for 1.14.1-pre2.
Confirmed for 1.14.1
I can confirm this as well, for 1.14.1. It's bad enough where the lag will cause the server to completely kick everybody until I restart it.
Can confirm for 1.14.1. Like someone else said, it's sometimes so bad that the server crashes, with a best case scenario being 5 full seconds of complete suspension of ticks processing. It's gotten to the point where we've written a datapack to automatically warn everyone on the server when someone walks into a portal.
Worth noting that end portals work almost instantly. It's only nether portals that have this lag.
Not sure if related but we did have a few instances of "extra" portals being generated in the nether. IE a player would go through a existing portal from the over world and a new portal would be generated a block or two away from the existing lit portal. It has happened multiple times with different portals.
Able to replicated in 1.14.1
This issue is still present in 1.14.2 pre-release 3, but the time the server stays frozen during portal finding has lowered compared to 1.14.1. Typical duration is now 2-4 seconds per tick. On same host, it was 4-8 seconds before.
Was able to replicate the bug for 1.14.2 pre-release 3, same issues still occurs but slightly less effective spikes
Issue is still occurring in public release of 1.14.2
Can confirm on 1.14.2.
Is there a reason this is still unassigned? This is a huge issue for servers. Entering the nether or exiting causes huge lag spikes – upwards of 10 full seconds for my server running on an overclocked 7700K.
Jfarf_Gl This is a more complex issue that couldn't be solved by just assigning someone and starting working on an afternoon. Issue is known but involves more than just dealing with Nether portals themselves.
Progress on this issue has already been made on 1.14.2 pre-releases where the cost for loading already generated chunks has been significantly decreased.
Can confirm on 1.14.3. May be somehow related to
MC-149705?Still happens in 1.14.4 except now it permanently deadlocks the entire world in singleplayer and only a force-close can end it.
Confirmed vanilla 1.14.4
Our server has had constant 1-3 second freezes constantly and didn't understand until I tracked it to this issue, it occurs Very often because of zombie pigmen wandering in and out of portals.
Isn't there the possibility to keep a global (or region file based) record of portal blocks? Then, portals only need to check for the positions in that list instead of searching through millions of blocks. Portals are pretty rare blocks, so that list doesn't even need to be that large. That should be way more efficient than searching for essentially a needle in a haystack.
(I understand that it would be very hard to "upgrade" existing worlds to this feature, but I guess it could improve portal performance by a lot.)
As of 1.14.x, this issue appears to have two distinct causes: (1) Slow search algorithm for portals, and (2) Slow loading of Nether chunks. Fixing both causes is needed to restore good performance.
In 1.14 I can´t cross de nether portal because the "Loading Terrain" screen is infnite
same thing going on 1.16.1
@Max, please make a new bugreport for your problem with portals, as this bug was resolved almost a year ago and I can still confirm it being fixed. Also try to add your bug reproduction steps if you can.