-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak with forge server.. #10010
Comments
It sounds like you've got so-called "optimised" jvm flags such as those from Aikar's, which is a common culprit for GC-related issues. "Any large modpack" is too vague as well, we need proper steps to reproduce... What version of ATM9 exactly? Are we meant to keep pregenerating chunks until it OOMs or just leave the server idle or what? |
Tested without flags.. and every flag i can find. Tested different garbage collectors aswell (Shenandoah GC, ZCG). It happens with any version of atm9 (i'm mainly testing with the newest version 0.2.60 but have tested with multiple others to experience the same issue). Any modpack with a good amount of mods. It doesnt matter what pack just depends on how many mods it has, the more mods the quicker the issue occurs. Keep pre-genning till it OOM's (which would happen in 1-2 hours with modpacks the size of atm9 using 16gb of ram) If you disable OOM it will keep showing pre-gen working.. but wont actually be generating chunks. No commands will register either. |
Unable to reproduce with just Forge, so chances are the issue is caused by a mod. I tried two scenarios, both deliberately memory constrained to trigger the issue faster: Scenario A:
It finished generating all the requested chunks successfully over the course of many hours and never crashed with an out of memory error. Scenario B:
It took about an hour before it crashed with an out of memory error, despite having far less RAM allocated than you. The crash report lists some mods that might be involved in causing it, but I didn't look into it much as I was unable to reproduce the issue with just Forge alone. Mentioning that you're throwing more RAM at it doesn't really change anything - excessive amounts of RAM allocated to the game will be wasted at best and cause increasingly extreme lag spikes at worst. With this in mind, I'm going to mark this as "not us" and close the issue. Ask in the Discord or forums for help with troubleshooting, then file a new issue here when you're certain it's a problem with Forge itself (and not third-party mods made for Forge) and have a means for other people to reliably reproduce the problem. While we make a decent effort to help mod devs do things properly, ultimately we're not responsible for issues caused by mods - especially those that bypass Forge's APIs and directly modify the game. |
It takes ALOT longer with vanilla forge as in 24+ hours before it even begins to show (with 16gb). When i said alot longer i meant alot longer.. I spent 3 very painful weeks testing with this i know its an issue with modding platforms in general as i can run pre-gen on a vanilla server for atleast a week no issues.. Ive spent 10+ hours a day binary testing mods and like i said before its NOT a specific mod.. but its ALL of them.. Each one you add it makes the issue happen faster. Also 3gb of ram for atm9 is not enough, recommended is atleast 8. Please run a test with vanilla forge for 24+ hours and maybe spark if you would like to watch the memory. IT WILL slowly climb. Even if it doesnt crash for awhile you will see it start to overload at some point because gc struggles. |
There is no sane reason why you should be running a pre-gen command for 24+ hours. That would be trillions of chunks and run out of disc space if anything. |
Minecraft Version: 1.20.1
Forge Version: 47.2.0-47.3.1
Logs: I don't have any right now as i've reset everything multiple times.. Can easily get one if needed. Please test this to see what i'm talking about..
Steps to Reproduce:
Description of issue:
After multiple weeks of testing thinking this was a memory leak with a mod.. it's not a specific mod.. its any mod. The more mods you add the worse it gets. Ram will slowly climb till it eventually uses all of it. Eventually leading to the server either crashing or becoming unplayable with 3tps or lower.. The lag is caused when ram hits max and G1 old generation clears.. Which clears less ram every time it goes off, eventually leading g1 old to clear nothing every 30-60 seconds but still causing a 10+ second lag spike every time.. tested with 3 different hosting companies, my personal pc and multiple well known modpacks. I know someone will say "dedicate more ram" but i don't have money to be purchasing more than 20gb.. Especially for a server that only gets around 5 people on at one time. From what i know 16gb should be more than enough. Please, if anyone can pinpoint an issue it would help a ton.. I've spent weeks 10+ hours a day trying to figure this out.
UPDATE: Tested with 20gb, 32gb, 100gb of ram (yes i know it's too much but i've tried literally everything and have no idea what to do now) and it all still crashes with an "out of memory" error after 1-2 hrs. This issue does NOT occur with vanilla minecraft.. I have talked to dozens of well known devs for them to be just as confused as I am. Again tested with multiple popular hosting companies such as bisect, bloomhost, apex, and again on my two personal computers. I have tried every version of java, every jvm arg, no jvm args, other garbage collectors, every mod that claims to fix memory issues or enhance performance, to run into the same exact issue. Nobody can explain what is going on here.
The text was updated successfully, but these errors were encountered: