On Jan 3, 2006, at 3:33 PM, Prabhat Dalmia wrote:
Folks,
I see these messages in my error log. The times are out of sync - we
have a log messages from a later time getting printed first. I am not
sure how can this kind of thing happen. Does anyone have any clues ?
2005-12-14 20:01:58,478
[ctag.ems.raw.HLP_G2CTagRdr.__HLP_G2CTagRdr__01]
Status Event
2005-12-14 20:01:58,619
[ctag.ems.raw.HLP_G2CTagRdr.__HLP_G2CTagRdr__01]
EPC Event
2005-12-14 20:22:06,674 [ctag.ems.raw] Status Event
2005-12-14 20:14:22,724
[ctag.ems.raw.HLP_G2CTagRdr.__HLP_G2CTagRdr__01]
Status Event
2005-12-14 20:14:22,849
[ctag.ems.raw.HLP_G2CTagRdr.__HLP_G2CTagRdr__01]
Status Event
Thanks,
Prabhat
Slight discrepancies in timestamp order have been observed and are
unavoidable when multiple threads block waiting for a lock to be
released. If multiple threads are waiting for the same lock to be
released, the JVM spec makes no guarantee which thread will continue
when the lock is released. So if thread 1 is writing to a file
appender, and thread 2 blocks, then thread 3 blocks, either thread 2
or thread 3 may be awoken when thread 1 finishes. Since the time
stamp is acquired before the lock, it may mean that the time stamps
in the file are out of order.
The best way to avoid the problem is to reduce the frequency of
multiple threads blocking. The easiest way to do this is to wrap
your current appender in an async appender sized sufficiently that
the buffer is never filled and only has to block for the time
necessary to insert the event into the queue.
I have never seen the problem result in a 10 minute gap though,
usually it is less than a second, so something else may be at work.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]