Mekanism Tools

Mekanism Tools

77M Downloads

10.3.9 - Pipes/Cables leading to Out of Memory on server

Scharage opened this issue ยท 3 comments

commented

Issue description

Heyha, my friends and me are playing a modpak on a server, which includes Mekanism 10.3.9 . After we have placed multiple Logistical Pipes/Energy Cables we noticed our server started to lag after a while, reaching a Out of Memory at the end.

We deduced it must be the Pipes after we have profiled the server with visual vm (and removed them afterwards). Below is a screenshot of the relevant classes which climb in counts.

image
It reached about 1 millionen BasicCapabilityResolver objects in just 20 minutes runtime. And many mekanism classes also reach high levels. (We have only placed about 50 pipes in total)

Do you know how this could happen? Or pointers how we can fix that codewise? (As i understand you do not develop the earlier versions anymore, so we would try it ourselves.)

Thx for working on such a great mod :)

Steps to reproduce

No response

Minecraft version

1.20.x or earlier (No longer being developed)

NeoForge version

43.4.2

Mekanism version

Older

Other relevant versions

No response

If a (crash)log is relevant for this issue, link it here: (It's almost always relevant)

No response

commented

Yep this is a heap dump view.

I looked into allocation. And it is allocated via the blockenitity, so i guess it is like you said and someone forces a regeneration of the blocks and it just randomly hits the mekanism cables. Below a screenshot of the allocation stacktrace:
image
I am not really versed in minecraft and its code, what method would be called to achieve such a yoyo chunkloading?

commented

Update: I noticed that the chunkloading reason may be coppled to compact maschinery and not mekanism itself.
I just noticed it through mekanism as the cables are used to connect to the tunnels of them.

Will close this issue, thank you for giving the suggestion it may be something with chunkloading :)

commented

first of all, is that a heap dump view? If not I don't see the relevance to an out of memory error

second, you'd need to locate where things are being allocated - you could have some yo-yo chunkloading going on (loading and then unloading due to another poorly coded mod)