Hi, I have a Tag event script for a group of tags. This tag event script writes to the database when the values of the tags changes, but sometimes I get a Clock drift error in the console
Clock drift, degraded performance, or pause-the-world detected. lastTime=Fri Nov 20 15:34:42 ART 2015 currentTime=Fri Nov 20 15:34:44 ART 2015 deviation from expected 1000ms delta=1145ms.
This clockdrift error is causing my tag event script to execute and write to the database when it should not, I think this happen because the tags lose the connection briefly and when reconnect the script take it like a value change.
My question is, is there a way to not execute the script when lose the connection? or maybe a way to don’t get a Clockdrift error?
The first thing to check here is the pause-the-world possibility, even though it’s last in the list of possibilities. I suspect this isn’t java8 – its defaults are much more resistant to this problem. You might want to look at this topic.
[quote=“MoisesZV”]I have java 8 updated, my PC is 32 bits 4gb ram. I have a lot of clockdrift error through the day.[/quote]It might just be too little ram. Less ram for java => more garbage collection events.
The recommendations I pointed at include the garbage collection diagnostics that will tell you how long your pause-the-world events are. Please adjust your wrapper configuration accordingly. Then show the log entries leading up to and after (say, +/- 30 minutes) of each of your clock drift errors.
Also, consider googling “java pause the world” to get some background on the issue.