Mojira Archive
MCPE-77266

Mobs remain in memory

Memory clean up for mobs and entities does not seem to occur. 

Steps to reproduce

name tag a mob (or spawn a unique mob of any type). execute the following command

  1. /tp @s ~+1000 ~ ~+1000
  2. Wait for several minutes or hours at that location.
  3. run the following command:

    /execute @e [name="nametagedname"] ~~~ say hi

Expected result

You get a red message saying "No targets matched selector"

Actual result

Jim says "hi."

The root issue is that over time CPU and RAM usage creep up over time causing large amounts of lag on busy servers. Right now this causes a forced reboot of the BDS software frequently to empty the memory.

This may be reduced with mob despawning however it still is a memory leak that causes things to go way up over time. In small quantities it is not a problem, however with a world spawning thousands of blocks and has many players, this becomes a major issue.

Unresolved

MadHatter

2020-05-10, 05:04 PM

2024-12-11, 03:37 PM

37

9

Confirmed

364059

mobs, optimization

1.21.20.21 Preview - 1.21.2 Hotfix1.21.20.21 Preview, 1.17.0.50 Beta, 1.16.230.54 Beta, 1.16.220, 1.14.60 Hotfix, 1.16.20, 1.16.100, 1.16.201 Hotfix, 1.17.2 Hotfix, 1.17.30, 1.18.1 Hotfix, 1.18.31, 1.19.0, 1.19.30, 1.21.2 Hotfix

-