Can't keep up! Did the system time change

Hello!
I have little private server on VDS.

Debian 9
Java 8
forge-1.10.2-12.18.3.2511
SpongeForge: 1.10.2-2477-5.2.0-BETA-2731

E3 1270 x2
32gb Ram
3tb hdd

-Xms20g -Xmx20g

Every 5-10 minutes a message appears in the log.

Can’t keep up! Did the system time change, or is the server overloaded? Running 4882ms behind, skipping 97 tick(s)
and
Time ran backwards! Did the system time change?

sponge timings report
https://timings.aikar.co/?id=65e0409ed0334791a8f001e17f09b7eb

93.5% - Minecraft::Full Server Tick (SELF)

but i dont have any lagg or freez. My hdd so slow?

Please help!
Thanks!

UPD1
I create ramdisk and moved the disk there but nothing changed :frowning:

Are you running windows? If so. Open up task manager and click the performace tab.

After that run the server.

You will probably see something go to 100%. Leave the server running for a little bit after its booted. So you get like 3-4 running slow messages. Keeping track of what part of your pc is running slow.

After that report back.

No , im using debian 9.
All threads near 0.3% - 1% loading.

I know java on Linux is a bit different (such as when deleting files it doesn’t actually delete them but just changes the name so its ignored by the file viewer but listing all files there in java will show it).

But you have me completely stumped.

Im surpised your not noticing it. 48 seconds is a long time in computer time to skip.
If you have another computer capable of running a server (preferably on another os). Then try it on that.

Also im not sure how linux deals with system time. If your not noticing it. It could be that your server is running fine but the system clock is out of sync with seconds or just not moving at all.

The CPU you are using was released 5 years ago midway through 2012.

However, the large amount of ram you have I wonder what flags you are using to launch the server.

I doubt garbage collection is running for a full 4.8 seconds, but it’s possible.

I suggest you follow @Aikar 's suggestions for a base level. Optimized Startup Flags for consistent Garbage Collection

1 Like

I was start server in other computer.And there have no this error

Windows 10
AMD Fx 8300
8gb ram

java -Xmx4g -Xms4g -jar forge-1.10.2-12.18.3.2511-universal.jar

On VDS
screen -dmS mcmodded java -Xmx20g -Xms20g -jar forge-1.10.2-12.18.3.2511-universal.jar

That’s meaning problem with time in my VDS?
May be in the default debian 9 does not have need apt?

The possibility of a time error is very very low.

The message you see is saying “When Minecraft checked the time jumped foward compared to last tick. Either the minecraft server has been stuck for a significant amount of time (long time between checks), or the server time changed forwards”

The server time changing forwards without your knowledge is extremely unlikely, and if it did happen, wouldn’t happen too often.

Which leaves the other possibility, the Minecraft server is pausing for too long between checks sometimes.

A common source of this problem is Java GC/Garbage Collection. Java needs to pause the server for a short time in order to clean up garbage in memory that is no longer needed. This takes longer the more ram you have.

The garbage collector needs to be tuned for different applications, at the moment, “screen -dmS mcmodded java -Xmx20g -Xms20g -jar forge-1.10.2-12.18.3.2511-universal.jar” isn’t passing it the arguments needed to tune the garbage collection for realtime game work.

@Aikar invented the timings system that created the report you showed, he is very knowledgeable in tuning the Garbage Collection for Minecraft.

As per my previous post, Please read his suggestions and implement them.

I use this arguments now :

screen -dmS mcmodded java -Xms10g -Xmx10g -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=100 -XX:+DisableExplicitGC -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=35 -XX:G1MaxNewSizePercent=35 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=50 -XX:+AggressiveOpts -XX:+AlwaysPreTouch -jar forge-1.10.2-12.18.3.2511-universal.jar

but error appears every 10 minutes :frowning:
Less often than before, but appears.

UPD
all messages are the same
[16:56:14] [Server thread/WARN]: Can’t keep up! Did the system time change, or is the server overloaded? Running 8766ms behind, skipping 175 tick(s)
[16:56:06] [Server thread/WARN]: Time ran backwards! Did the system time change?
[17:04:28] [Server thread/WARN]: Can’t keep up! Did the system time change, or is the server overloaded? Running 8760ms behind, skipping 175 tick(s)
[17:04:22] [Server thread/WARN]: Time ran backwards! Did the system time change?
[17:09:35] [Server thread/WARN]: Can’t keep up! Did the system time change, or is the server overloaded? Running 8758ms behind, skipping 175 tick(s)
[17:09:27] [Server thread/WARN]: Time ran backwards! Did the system time change?
[17:18:13] [Server thread/WARN]: Can’t keep up! Did the system time change, or is the server overloaded? Running 8761ms behind, skipping 175 tick(s)
[17:18:08] [Server thread/WARN]: Time ran backwards! Did the system time change?

Time ran backwards!, I haven’t seen that yet. Long GC pauses can’t cause this. It is more likely a clock change or maybe an Integer overflow(@ryantheleach ?).

1 Like

I didn’t see the time ran backwards one, Maybe your clock really is being updated that often, very very strange it’s getting that far out of sync. Contact your server host, something is wrong with your VM / hardware in a critical way.

if i does not can fix error , this message can be off?

i have a similar problem, i started my server a few minutes ago and i don’t know how to leave ticks behind i play on a macbook and it says: Can’t keep up! Is the server overloaded? Running 2506ms or 50 ticks behind

This error is almost inevitable, even with un-modded ‘Vanilla’ Minecraft. I’ve been testing the latest release (1.13) on my i7, and even a server with only two players (view distance=10) gets that occasionally. You can probably reduce it’s frequency by lowering the server view distance, or via more extreme measures (such as turning off mobs, or the nether).

1 Like

Actually, there is one other big source of server lag that can be minimised: world generation. That’s about the most taxing thing a server can do. If you set a world border and then use a plugin or mod to pre-generate the map (preferably on an empty server), then Wgen lag becomes a thing of the past. Unless you expand the world border.

if it says time ran backwards its commonly because java is stupid and at a time when it goes from 12:00 to 1:00 it sees it when backwards. also when it skips ticks i wouldn’t worry if its like 40 or something because thats common on modded servers but if its more that 50 and its common occurrence then you have a problem.