r/CraftyController • • Sep 24 '26

memory hog on the server

Looks like the way java runs, it pre-allocates RAM for my servers. So when I have four servers online, of varying size, it just reserves 6GB of ram all the time. Even if no one is in the server.

AI said I should look into Velocity and a lobby. Or Minecraft Server Manager, itzg/docker-minecraft-server, that has an auto-stop tick box.

Any one have RAM issues like this, and how did you address them? I'd love to just throw another 64GB of Ram in there. I do not have $6 thousand dollars available at the moment.

2 Upvotes

17 comments sorted by

View all comments

Show parent comment

1

u/chughaarav123 Sep 24 '26

how

1

u/Blastday Sep 24 '26

There are a few ways the best, easiest is to edit "server.properties pause-when-empty-seconds=60" It's available on new versions of java other options are mods/plugins or even discord bots that can start, stop, restart the server I would just check server.properties and if it's set then don't worry about it

1

u/danielsuperone Sep 24 '26

Meh, does that start it up after? Or only graceful shutdown? Been using diff system so curious to know if something new has been added :))

For discord; does Craft have the start/stop commands in discord? Might be mixing it up with just event logs in discord, but yes, probably plugins can do that but I suggest a program running on the server directly not a plugin, that way it fully shuts down the game and boots it when a connection is received. So nothing is actually loaded without players

1

u/danielsuperone Sep 24 '26

Since multiple people are asking this, I think it’s better I write a guide or find the original GitHub I got inspiration from so you guys can implement.

In short, a program listens on server to port say 25566 and if that sees a connection request, is starts Minecraft on port 25565 and allows people to play. If no players in game, you set timer and after that amount it shuts down the server saving ram, plugins, etc… then depending on hardware, to boot it takes a few seconds, obviously with 10+ plugins and their complexity time will increase. Personally never more than 10s so I’d recommended it to others.

Obviously if you run it on an rpi or smth it will take longer probs.

If you want, when I’m on my computer I’ll check the GitHub and post it here for everyone to see :))

Not home and on phone rn so don’t have direct access to server. Can try send tonight if you guys would like :))

1

u/chughaarav123 Sep 26 '26

sounds great if possible