Forums Archived

This forum has been archived. No new posts can be made and no new users can sign up. It remains here for reference only.

Find the new forums here

AMP Modded Minecraft Server Refuses to Sleep

  • 237 Views
  • Last Post 31 December 2021
  • Topic Is Solved
GoldenCrepe posted this 31 December 2021

OS Name/Version: Ubuntu 20.04.3 LTS

Product Name/Version: AMP v2.3.0.8 running Minecraft Forge 1.12.2

Problem Description: I have a modded server that I made on a spare laptop for some friends and me, but I realized it's not going to sleep.

Actions taken to resolve so far: "Enable Sleep Mode" is on, sleep mode delay is set to five minutes, and doze delay is set to two minutes. I tried to do a vanilla server also in 1.12.2 and it did the same thing. When I attempted to force it to sleep, it made a little bump in the cpu usage and continued on as if nothing happened. (Note, here I changed the sleep mode delay to one minute and restarted the server for testing purposes.)

Possible useful information: This happens even when nobody has joined or attempted to join the server. I am running JDK 8

Order By: Standard | Newest | Votes
Mike posted this 31 December 2021

Sleep mode is only supported on servers that can be connected to with an unmodified vanilla client. AMP tries to connect to the server to query the information needed for sleep mode. If it can't do this (because the server replied in a way that it didn't expect or because the server didn't understand the request) then the feature is not available.

You should check AMPs logs with debug mode enabled to see if it has anything to say about the sleep configuration when the server starts up.

GoldenCrepe posted this 31 December 2021

Thank you for the quick reply! I'm not too bright with stuff like this, so is there any alternative? I'm just afraid the hardware will get worn out after running the server 24/7, although it's really just the RAM to worry about since CPU usage will stay at 0%.

AbhorrentJoel posted this 31 December 2021

One easy alternative is that you schedule when the Minecraft server is on and off. You can do that from the AMP panel for the instance. I understand that is a fairly generic approach, and users will not be able to connect outside of the active hours in this situation.

The other easy alternative is that you create users on the AMP panel itself for that instance and give people permissions to stop and start the server as needed. Understandably, this is not an ideal solution as you would need to give users access to the AMP panel and you would need to forward the ports for it - and users may not want to stop and start the server because of convenience.

Your main concern should be power consumption and hardware not getting "worn" out. Hardware will degrade from usage, but there is little risk of accelerated degredation of components unless they are running hot. If it were me, I would probably concerned about using an old laptop as a server because it contains a battery that will be hooked up all the time - that will degrade the battery to say the least.

  • Liked by
  • GoldenCrepe
GoldenCrepe posted this 31 December 2021

Thank you very much! I'll probably go with the first solution since we're all in the same time zone and (usually) asleep after midnight. I'm not too worried about the battery, since I have no other use for the laptop and it's always plugged in. Hopefully sometime in the future Mike figures out some other way to put the server to sleep, but until then, schedules will work just fine!

AbhorrentJoel posted this 31 December 2021

I do not know how it is coded with AMP, but based on what Mike said, I would guess that AMP queries the server to get information about it to correctly replicate the Minecraft server as it is actually shut down when sleep mode is activated - AMP takes over and listens on the game port for a connection before waking it up again. In the case of a modded server, there is additional information the client needs, such as what mods are installed as one example. This probably falls outside of the expected query, so it is determined as not compatible. To be made compatible, AMP needs to know how to query for this additional information.

Close