[BlueOnyx:07374] Re: Dovecot shutting down

Michael Stauber mstauber at blueonyx.it
Tue May 24 20:23:47 -05 2011


Hi Gregg,

> dovecot: Fatal: Time just moved backwards by 13 seconds. This might cause a
> lot of problems, so I'll just kill myself now.
> 
> The problem is, it takes dovecot a lot longer than 13 seconds to come back
> on, sometimes more than 30 minutes. Is there a way for me to have the
> dovecot process come back up any sooner?

Your server is probably tied into an NTP server to automatically set the 
clock. Which all works fine. But your clock is drifting and whenever the NTP 
server "fixes" it by setting it to the correct time again, there is a more or 
less spectacular "jump" (like 13 seconds in your example). Which is enough to 
let Dovecot fall flat on its face.

Active Monitor runs every 15 minutes to check all enabled services to see if 
they're running. So within 15 minutes at the most Dovecot should then be 
restarted automatically. That *may* fail first time around, but gets fixed 
during the 2nd Active Monitor run another 15 minutes later.

How to fix this? Well, the best way ought to be to find out what makes the 
servers hardware clock go drifting and to fix that. Under VMware virtual Linux 
machines are known to have drifting clocks and there are some fixes available, 
which I cannot recall, as I usually avoid VMware like the plague.

If it's a physical server, I would consult the motherboard manual and possibly 
the vendor support site for more info.

At the worst you could try to fight the symptoms by either running the 
synchronization with the NTP server more frequently (so that the "jumps" 
aren't so massive). Or you could try to run the Active Monitor cronjob more 
frequently. That however creates too much overhead, as you don't really need 
to check every service like once a minute.

So in that case a custom cronjob that just checks Dovecot (and restarts it if 
need be) could be a work around.

But like said: Best would be to fight the cause, not to doctor with the 
symptoms.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list