Critical ClockDriftDetector error

Something went VERY wrong and I have no idea how the time got changed by a month.

I logged in today to look at some trends and noticed 95% of my tags were not recording trends. Went onto the gateway and didn't see any issues with quarantined data or anything in my cache. But then noticed that there was a weird date in my log.

How did this happen and how can I fix it?

  1. What OS is the gateway running on?
  2. What's the OS clock reading?
  3. What's the OS timezone?
  4. Are you keeping the OS clock in sync with an NTP server? Which one?
  1. Server 2019 Datacenter version 1809 build:17763.6532
  2. OS Clock reading is correct since we discovered the issue.
  3. timezone:UTC-8 Pacific -- Set time automatically = on Set time zone automatically = off
  4. NTP server used: ca.pool.ntp.org

You can't get a log entry in 2025 unless date and time on your OS is badly broken.

Consider not using Windows. Its NTP client does time warps when given bogus data. (Instant change to new time.)

Linux' NTP client only does a time warp on initial boot. Later bogus data starts a slow skew adjustment that usually doesn't make a big change before the bogus data disappears on the next NTP poll. (And skews the small change back to proper.)

Windows is simply dumb in this case. (Among others.)

Or use a local NTP time source that won't give you bogus data, like a GPS receiver.

1 Like

All of what @pturmel said. Especially the GPS receiver for the time server.

However, if you are stuck on Windows (unfortunately, that still happens), Meinberg's NTP Software is a good alternative over W32Time.

Thanks for the feedback! It looks like this is the reason that the time got messed up. Looking at the server logs confirms it.

The main problem though is that I think it's broken the historian settings or maybe the partitioning of the historian. Is there a way to fix it?

The partition manager has a table for 2025_01 (Jan 2025) as seen on the second line in the logs.

FYI I restarted the server and the data history started collecting normally again. Lost data was not backfilled.