At 7:25 PM +0200 4/8/07, Chaos Engine wrote:
Hi there, I got a daily cron (rdate to local time server) job wich adjusts time and which constantly gives me headache. Every day my dovecot suicides with:
"dovecot: Time just moved backwards by 11 seconds. This might cause a lot of problems, so I'll just kill myself now."
Of course my onboard clock is constantly off by more than 5 secs.
How "of course?"
The last time I had a machine's NTP synch stop working, it diverged less than 2 seconds from reality in a week. Looking at a few machines where the LOM cards have RTC's independent of the motherboard RTC's, I see divergence of 0-4 seconds over the past 2 months.
I don't want to abandon time synchronization and I want to use dovecot. Maybe a -HUP signal would do? What do you propose?
3 options
- Repair your hardware. Gaining 5 seconds per day is not normal, and really should not be tolerated in a system that has to converse with other machines.
- Set up something that will do the adjustment for you on a more continuous basis. Xntpd will track your drift and keep you more in sync on a continuous basis by slewing the clock rather than stepping it back daily.
- Make that cron job smarter but stopping Dovecot (and anything else that might care about time moving backwards) ahead of the change, and then waiting until your clock is back ahead of that to restart them.
There are technical strategies (e.g. Maildir naming) which rely on the assumption of the clock never repeating the same second twice.
Bill Cole
bill@scconsult.com