Excess memory usage on Paper server

i installed the server-side DH plugin on a small server I'm running, and upon joining the server, the ram spikes up extremely fast and promptly runs out of memory and crashes. even at 16gb of memory, it just goes up to the max in less than a minute and crashes - is this ram usage normal, or is there anything I can do to fix it?
Solution:
You have told Java that its heap can be the full memory limit of the container, but that's not true
Jump to solution
14 Replies
Kiyo!
Kiyo!OP4w ago
worth noting I had the thread count at 4 and then switched it to 2, the problem still persists
Jckf
Jckf4w ago
Please list which plugins and datapacks you're using, and which Java flags
Kiyo!
Kiyo!OP4w ago
this is a screenshot of every plugin I have installed - no datapacks to my knowledge
No description
Kiyo!
Kiyo!OP4w ago
i was on the release version before, i just tried the nightly version of DH and the problem still persists, albeit somewhat mitigated from what i can see and these are my current java flags, ram was only increased for testing purposes: java --add-modules=jdk.incubator.vector -Xms128M -Xmx16384M -Dterminal.jline=false -Dterminal.ansi=true -jar server.jar if it helps, I just tried it on a stock server with only DH installed, and it happened there aswell with 8gb of ram and the default config
Jckf
Jckf4w ago
Strange. I can run 4 workers with 8 GBs here, and no issues
Kiyo!
Kiyo!OP4w ago
crashed within 50 seconds of me joining
Jckf
Jckf4w ago
Right This isn't a crash Pterodactyl is killing the server
Solution
Jckf
Jckf4w ago
You have told Java that its heap can be the full memory limit of the container, but that's not true
Jckf
Jckf4w ago
You have to leave room for some other things in memory too The Xmx parameter is not the max amount of memory Java can use, it's the max size of the heap. There's a bunch of other Java things in memory too
Kiyo!
Kiyo!OP4w ago
ahh okay - so I should allocate more to the instance in Pterodactyl? it automatically sets the memory for me in the java flags so I didn't suspect it as an issue
Jckf
Jckf4w ago
Or lower the Xmx value. Try with 1 gig higher limit in Pterodactyl than Xmx Not the first time I've seen it, but I always forget it's a thing. Should maybe write on the wiki about it
Kiyo!
Kiyo!OP4w ago
trying that now, thank you seems to be fixed at first glance - thanks!

Did you find this page helpful?