Re: System.currentTimeMillis() out of sync with servertime (?)
Christiaan wrote:
We have a process running (java 1.5) on a Unix server. This process uses
Log4j. When we tail the logfile we see that the timestamp of the
loglines is lagging minutes behind the actual system time. Log4j uses
System.currentTimeMillis when it is logging, so I believe there's
something with the JVM.
This process has been running for a long time (several months), and it
looks as if the offset is growing.
We have another process running (java 1.4), which is also lagging behind
the actual system time (less than a minute, but the process hasn't been
running for such a long time as the other one).
I've ruled out the possibility that the system is too busy handling the
file-i/o, because most of the time those processes are practically idle
(so there would be more than time enough to catch up)
Does this ring a bell, anybody?
Does the computer have dual core or multiple processors? There is an
issue with multi processors and the timers. I don't know for sure that
it was fixed in 1.6 but you might just try running it under 1.6 to see.
--
Knute Johnson
email s/nospam/knute/