Uploaded image for project: 'Bedrock Dedicated Server'
  1. Bedrock Dedicated Server
  2. BDS-17527

Multiple server crashes due to memory leak when loading chunks

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.20.30
    • 1.19.20, 1.19.21 Hotfix, 1.19.30, 1.19.31 Hotfix, 1.19.41, 1.19.63, 1.20.12 Hotfix
    • OS = Debian GNU/Linux 10 (Buster)
      Kernel = Linux 4.19.0-13-cloud-amd64
      Server hosted on a 3rd-party VPS
    • Community Consensus
    • 881031

      Server is running mostly default survival settings except for simulation distance of 6 and chunk render distance of 32. Has been stable for the past year without issue until around 1 month ago. At first we believed the crashes to be caused by entering portals too quickly (going from nether to overworld, then overworld to end portal fast) since some of the crashes were occurring under those conditions, but we have also been getting crashes throughout normal gameplay, when performing normal actions such as placing blocks or even walking around. The crashes occur in multiple areas, overworld, nether, and end. There doesn't seem to be a specific chunk or groups of chunks causing this since the same areas may be fine one moment, then crash at another. As of now the server will crash at least 4-5 times a day if people are active. Checking memory usage showed a steady usage of around 700MB our of the 3GB allocated, so there doesn't seem to be any issue there.

      Made the bug public and removed the world file since I confirmed the memory leak occurs with a fresh world. Also adding some extra info from my comments below:

      After further testing this seems to be a memory leak related to chunk loading. If you check the memory while standing still, not loading chunks, it should be stable. When you load chunks, whether it's via crossing portals, flying, etc. the memory use increases and not come back down, which it should not be doing. Running farms while standing still did not affect the memory usage for us. Passive mob farms, redstone mechanisms, etc. did not contribute to the memory leak. Here's a log of our memory use up until the server crashed again.

      Crash reports are fairly limited in information, but here are some of them attached below.

        1. bds-smaps-15teleportevents.txt
          195 kB
          Paul Bramhall
        2. bds-smaps-launched.txt
          187 kB
          Paul Bramhall
        3. bds-smaps-userloggedin.txt
          192 kB
          Paul Bramhall
        4. heap.dump.gz.partaa
          10.00 MB
          Paul Bramhall
        5. heap.dump.gz.partab
          10.00 MB
          Paul Bramhall
        6. heap.dump.gz.partac
          2.28 MB
          Paul Bramhall
        7. image-2022-09-07-09-50-29-828.png
          43 kB
          NavDaz76
        8. image-2022-09-09-07-30-54-970.png
          36 kB
          NavDaz76
        9. pidstat.txt
          63 kB
          Paul Bramhall
        10. RamGraph.PNG
          96 kB
          Foxy No-Tail
        11. RamGraph2.PNG
          164 kB
          Foxy No-Tail
        12. RamGraph3.PNG
          123 kB
          Foxy No-Tail
        13. Screenshot_20230510_165647_Chrome.jpg
          548 kB
          Matthew Dietrich
        14. server_log.txt
          3 kB
          Paul Bramhall
        15. Server_RAM.PNG
          29 kB
          timmyc1983
        16. server.properties
          5 kB
          MaladjustedPlatypus
        17. server-1.properties
          0.9 kB
          Paul Bramhall
        18. Server Files.PNG
          95 kB
          MaladjustedPlatypus
        19. syrupy_20220827204110.ps.log
          564 kB
          MaladjustedPlatypus
        20. TRS.2022.08.23.20.17.37.log
          4 kB
          MaladjustedPlatypus
        21. TRS.2022.08.24.09.55.26.log
          5 kB
          MaladjustedPlatypus
        22. TRS.2022.08.24.14.51.04.log
          5 kB
          MaladjustedPlatypus
        23. TRS.2022.08.25.04.00.41.log
          19 kB
          MaladjustedPlatypus
        24. TRS.2022.08.26.17.05.38.log
          3 kB
          MaladjustedPlatypus
        25. TRS.2022.08.27.04.00.42.log
          10 kB
          MaladjustedPlatypus
        26. TRS.2022.08.27.17.25.05.log
          4 kB
          MaladjustedPlatypus

            Unassigned Unassigned
            Mistahtokyo MaladjustedPlatypus
            Votes:
            83 Vote for this issue
            Watchers:
            44 Start watching this issue

              Created:
              Updated:
              Resolved: