How do you handle time sync issues?

I was wondering if anyone has run into a similar issue and knows a way around this issue. I have a client that talks to InfluxDB. InfluxDB is on a different server than the client. The InfluxDB server is locked down and is not able to properly sync the time therefore its approx 12 seconds behind the client time.

I have a few queries that are failing with the error “error in building plan while starting program: cannot query an empty range”. Im getting the error because im passing a start time that is “in the future” in the eyes of the InfluxDB Server, but not in the future on the Client. Ive tried to “fudge” the start time by the approx difference in time but just end up running into other issues later on.

Does anyone have any ideas of how I would be able to pass a start time thats “in the future” without receiving that error?

Hello @ticchioned,

Yah that was going to be one of my first recommendations was to try something like:

adjusted_start_time = actual_start_time - 12 seconds
adjusted_end_time = actual_end_time - 12 seconds

But otherwise using something like Chrony and leverage NTP.

We have a large number of machines (~150) and use Greyware Time Domain II to sync to an internal GPS standard. Accuracy across machines is ~1ms. I’ve used it for years without any problems.