2

I have 2 servers set with the same timezone and I set them with the same time and I have them both updating their server time from the same internet time source.

But each week they seem to fall away from each other time wise, one will always end up about 30 seconds out of sync from the other.

Why does this happen and how can I prevent it?

1

1 Answer 1

3

This happens because of many many reasons (most likely, different quality crystals/capacitors in rtc chips and/or different temperatures,...). 30s per week is alot, but that could be 15s per week for each server in different directions (one too slow, one too fast).

To prevent this, configure ntp to sync the time to an external timeserver. If you cannot connect outside, you can set up a ntp server on one of them and sync the other with it. Their clocks will be both wrong, but still synchronized.

7
  • thanks for the clarification - I guess I need to have it sync every night, I am kinda of dependent on these 2 times matching
    – Slee
    Aug 30, 2012 at 15:23
  • Slee, you wouldn't have it sync every night, it would constantly be in sync. NTP constantly compares itself to the upstream servers and makes adjustments so that time is accurate.
    – Kyle Smith
    Aug 30, 2012 at 15:54
  • @KyleSmith, you're wrong, that would kill pool.ntp.org if that were the case. It's on a schedule, to adjust look at something like pretentiousname.com/timesync/index.html.
    – Alex Berry
    Aug 30, 2012 at 16:38
  • 1
    @Slee, are these servers virtual machines? If so they will need a piece of software that keeps time in sync with the hypervisor, and have the hypervisor sync to the NTP server. This is a very common occurence in virtual machines as it is difficult to emulate an accurate RTC, the VMs rely on clock cycles to maintain their time.
    – Alex Berry
    Aug 30, 2012 at 16:40
  • 1
    It really depends on the hypervisor underneath it, if you can find out what it is then you should be able to find what software you need, for instance if it's VMWare you'll need to install VMWare tools.
    – Alex Berry
    Aug 31, 2012 at 7:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .