I'm facing with a strange behave and I have no idea how to identify the cause.
-- Ignition 8.1.35 with 6GB RAM allocated (8GB total) and 4 CPU 2.97 GHz in virtual environment --
on some OPC tags value changed scripts are in place that are inserting the tag value in an SQL
the problem is that from the moment when the value are changing (I can see it the tag Timestamp parameter) and the moment when the script are executed we can see a delay of 2-5 minutes and obviously in this time the value can change multiple times and we are losing data
on the status page I see Clock drift events recorded in every 1-3 hours but the delay is happen constantly
can anybody give some ideas how to catch the cause of this issue?
This is a task that takes too long to do directly in a tag event. Use the store and forward engine or use a gateway tag change event (in the project, not on the tag). See this recent topic for why this is true:
If you have very dynamic requirements, such that the event must originate on a tag event, this topic of advanced techniques might help you:
Scripted database operations do not use the store and forward engine unless the script function has "SF" in its name, and naturally that only applies to updates. (The store and forward engine can't do queries.)
As noted in those other topics, using java's System.nanoTime() to obtain timing information in your scripts will help you identify the problems. But I'd first just search for system.db., system.tag., system.opc., and system.net. in your tag scripts. That will quickly highlight likely problems.