Schedule MineOS Reboot?

Can this be done?

Not looking to just restart the server, i’m wanting to every other day schedule an entire Operating System Reboot.
I’m not good at linux commands and strings, i know how to copy and paste, that’s about it so any help on a string or what needs to be done would be greatly appreciated.

Thank you.

Hi Kelly_Rowe,

There is something called ‘cron’ or a ‘cron job’ that I know nothing about but have read others on the question.

Apparently MineOS supports cron so what you ask may be doable at the MineOs server level.

Not sure about the Turnkey server level but I would guess it also supports cron.

Good Luck!


I’ve been reading up on cron jobs and commands and I’m not really finding or understanding exactly what commands I need or how to construct them to do what I’m wanting.

Because my system is limited on resources after about 2 days of running it needs a reboot and server restart.

So I’m looking for a command string to stop server then reboot system, every other day at like 4 am.

Is it a memory issue that forces a need for reboot?

If it is the following routine will help you:

free -m
free -m

free -m lists current memory usage, the two next commands syncs and frees up memory and cache, then free -m is ran again so that you can see that there has been a load of memory freed.

The advantage with the method above is that it can be done witout stoping any servers, so that your users never notice any downtime while your server reboots.

Another tip is to never allow the total of memory assigned to your Minecraft servers be greater than your physical memory available. For example:

Available phyiscal memory: 4Gb
Possible server / memory assignment configurations: 
servers:      Assigned memory:     Total memory assigned: 
4                  1Gb each                   4Gb
8                   .5Gb each                 4Gb
6                  2*1Gb, 4* .5GB          4Gb

I had a problem with my memory resources beeing gobbled up to the point of servers crashing. After I reduced memory assignments to never exceeed my physical memory max, no servers has crashed.

As for an automated restart this was discussed here: Restarting PC automatically

yes, that is why i’m needing the reboot is because of the memory limitations. the laptop has 4gb of ram, but the OS is using some, according to webmin 3.36 gb of ram is all that the system has, but when i set the server to use 3gb of ram, after several hours we would get kicked from time outs and the webui and webmin wouldn’t load forcing a system reboot.

so how and where do i assign the memory for the server?

if i put the drop_caches script on a daily cronjob it wouldn’t negatively effect anything would it?

OK, timeouts, do the log say something like “a tick took longer than x seconds and are considered frozen. Stopping server”?

If this is the issue there is a setting in you can adjust to allow for longer ticks. I have to have long ticks, or else my servers stop periodically:


give that one a higher number, I run mine at 120000.

As for Minecraft Server memory:
You adjust that byr increasing or decreasing Xmx and Xms. I make sure that the Xmx total off all my Minecraft servers equals or is lower than my physical memory, and I allways set Xms at half what I set the Xmx to.

If you only run one server, its probably not memory that is your biggest problem, since a small server should run fine on half a gig of memory. Try to adjust max-tick-time first.

[16:25:05] [Server thread/WARN]: Can’t keep up! Did the system time change, or is the server overloaded? Running 2351ms behind, skipping 47 tick(s)
[17:22:04] [Server thread/WARN]: Can’t keep up! Did the system time change, or is the server overloaded? Running 2108ms behind, skipping 42 tick(s)
[17:22:23] [Server thread/WARN]: Can’t keep up! Did the system time change, or is the server overloaded? Running 3526ms behind, skipping 70 tick(s)
[17:34:33] [Server thread/INFO]: Cassiana lost connection: TranslatableComponent{key=‘disconnect.genericReason’, args=[Internal Exception: Broken pipe], siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null}}
[17:34:33] [Server thread/INFO]: Cassiana left the game

i’ve been doing research on the mod pack and everything, even downloaded and ran opis but i can’t find what is causing the can’t keep up…

it’s been doing it from the start of the server, even before putting it on MineOS, i can have it set to use 10gigs of ram on my system, not running anything else at all, and it still give that message.

but i don’t think that is exactly what is kicking us though.

This is a standard error that pops up inn all Minecraft servers. Nothing to worry about :slight_smile: I have a load of them as well, even on servers who are just idling (runnning with no connected players).

(If you google it you will find loads of forum posts about it on all the major minecraft forums)

As for the player disconnect:
It say “broken pipe” in your log:

[17:34:33] [Server thread/INFO]: Cassiana lost connection:
TranslatableComponent{key=‘disconnect.genericReason’, args=[Internal
Exception: Broken pipe], siblings=[],
style=Style{hasParent=false, color=null, bold=null, italic=null,
underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null}}

I think this is closer to an explanation (more info on Google again…). It does look like you have a network issue more than a MineOS / Minecraft issue. When you play, do all of you play locally (LAN)? or do you play over the internet? How do you connect to your network? And how is your MineOS machine connected to the network? (Cabled or Wireless network?)

it’s on the same LAN, but we connect via the router ip address.

so, add server button on multiplayer with

This rules out internet-related issues (other than the ones that can come from Mojang authentication, but an auth-error would not kick anybody out, but deny access).

So are you connecting wirelessly?

nope, everything is hard wired, and after a time-out kick, now that i’ve lowered ram usage to 2.5gigs, after a minute or so for the server log to show that we have been disconnected we can connect again.

btw, i don’t see anything about max-tick-time in server properties.

Have you tried to run a unmodded vanilla server to see if that behaves the same way?

for like 2 minutes to go, “HEY!!! MINEOS WORKS!”

then started the FTB server, lol

OK, try a vanilla server for a period long enough to see if the same behaviour happends. If it behaves with a vanilla, there is something with FTB it do not like, or FTB is to heavy for your hardware.

FTB (and modded servers) are quite hefty servers to run. @tNt is the person to help with streamlining modded servers (I am more of a vanilla, pocketmine and bukkit admin, and know a bit of hardware and such…).

still getting timed out kicks from time to time, vanilla ran smoothly, i’m thinking it’s related to the tick delay, it always seems to kick us when we’re doing something and it lags significantly.

btw. the /proc/sys/vm/drop_caches didn’t work, gave access denied in root shell in a box.

this was done right after a timed out kick also.

root@core ~# free -m
total used free shared buffers cached
Mem: 3436 3322 114 0 18 226
-/+ buffers/cache: 3077 359
Swap: 3556 468 3088
root@core ~# sync
root@core ~# /proc/sys/vm/drop_caches
-bash: /proc/sys/vm/drop_caches: Permission denied

Huhh. Strange. If you are using the root user, you should be allowed to use that command. I have several times, but then again, I run my MineOS on top of an Ubuntu Server OS.

If Vanilla runs smoothly, I can only suggest that there is one or more of the mods in yout FTB-server that are to resource-heavy for your hardware, and more spesifically: Your CPU. Ram here has little to do with it unfortunately. @tNt may be able to help you streamline your FTB / Modded server, I can only reccomend better hardware if you wish to run FTB…


drop_caches isn’t an executable binary, but instead just a receiver for the kernel to get commands. The full command should instead be:

echo 3 > /proc/sys/vm/drop_caches

Keep in mind, this is really only good as a diagnosis utility, and not as a normal, production step. Caching is good–always good, and for the most part, Linux and the JVM know how to handle memory far better than we can manage it.

When you drop caches, you’re telling the Linux Kernel “hey, you have some stuff in memory that I don’t think you need anymore, so forget about it. If you need it again load it again from the slower disk”.

If the Kernel is able to free the memory, it means Linux had stuff loaded it hasn’t used recently. Also, if the Kernel is able to free memory, when it’s needed, it will take longer to get it from your HDD/SSD, fast as they may be.

When the Kernel is not able to free memory, it means that memory could have been lost to a memory leak. This means that you need to restart your host anyway, because leaked memory is memory that no part of your system knows how to reclaim for the JVM.

The kernel, when it needs to, already drops caches. It takes negligible amount of time and doesn’t force the system to reload stuff it does care about, so clearing caches really doesn’t come with all that much benefit unless it’s happening at system boot.


Not a lot to add. I agree big time with iMelsom here, this is not the cause of you getting kicked.

That said, we get kicked also for no rhyme or reason, just today my youngest logged in and after about 10 minutes was kicked. I asked her to log back on and for 5 hours she was not booted and my oldest joined the game and played with no issues.

That said, there is such a thing as too many mobs being spawned. Mods such as Orespawn together with Mo’ Better Mobs or many others that spawn mobs and creatures should be avoided on one server and can cause id conflicts. some can be resolved through the mod config files.

That said, many other mob and creature spwn mods work really well together and some effort has ben put in by various creators to resolve id conflicts.

Anyway as you can see it is not always so cut and dried. A lot of headache can be saved by getting someone else’s modpack collection as they have already gone through to make sure everything works well together, like Feed The Beast, Pat’s World and JayMontana36 has a few if not mistaken.

For example I had a “ticking entity” (this is different than the “can’t keep up” warning), that would cause the server to crash. The logs identified as a ‘Zombie’ that was ticking. A lot of observation and I noted one of the mods my girls wanted made Zombies attack villagers and turn them into zombies. Fine if by itself but the villagers were also modified by a mod that made them friendly and gave them personalities so when a zombie reached through a door at night and grabbed a villager, the whole server crashed. What a pain sorting that one out.

As to memory allocation some say set min. 256mb, I use 512mb. For max I use 1gb less than system so the OS can run. I would use 3gb for a 4gb system and shut down anything the OS did not need and not use that system for much of anything else but minecraft.

Good Luck!

(Sure say a lot for not having much to add, eh?)