Time drift on 1x Micro NodeJS instance

Hey there-

I have a small node express application setup on a 1x micro-tier.

After I deploy my application, the servertime (new Date()) is fine, but slowly it starts to drift backwards.

If I don’t deploy a new version for a while, the server time becomes more and more out of sync. > 5 seconds or more.

Wondering if these instances have any sort of syncronisation with NTP, of if there’s any way to fix this.

I ended up just using a Dockerfile instead of buildpacks. Seems like by using node:lts time is no longer drifting.

Using a Dockerfile, the time now drifts foward. Not able to pinpoint where the drift is happening though.

Hello,

Thank you for your report, you are right this is not expected.
After some investigation, we found the potential root cause for this drift.

We will be releasing a fix within the next few days.
I will post here to update you once it’s completely patched.

Thanks!
Bastien

1 Like

This should be fixed now, can you tell me if you are still experiencing drift ?

Thanks!

1 Like

Amazing @bastien -

It usually takes a bit of time before i can notice it.

  • Should I use my Dockerfile, or Buildpacks?
  • Should I redeploy?

Any of Dockerfile or buildpack.
And yes you need to redeploy.

Thanks @bastien -

I think its fixed! Really cool.

1 Like

we’re still experiencing time drift with our application deployed with docker, it usually caused issue for us after a day or two where it went more than 10 seconds out of sync
can you help to check on the issue?
our application is in rails

Hello, can you provide more information?
How are you measuring the drift?

If possible could you also include the output of ntpd or chrony that show the anomaly?

ntpd -w -n -p pool.ntp.org

and/or

chronyc tracking

Thanks,

Bastien

Hi Bastien,
I’ve been experiencing the drift for the past 3 months, but somehow it went away after Nov 24, i’ll let you know if it arises again.

Thank you