Tag Change Event Script Stops Executing (Ignition 8.3.6)

I’m running Ignition 8.3.6 and have a Gateway Tag Change Event script that performs some data transformation and then inserts the results into MongoDB.

The event is configured with a wildcard tag path, for example:

Code

[default]ABC/default/*/*/*/Time

The issue I’m seeing is that sometimes, probably after a Gateway restart (not sure), the Tag Change Event simply stops executing. The script doesn’t run at all until I make a change to it (for example, adding a logger statement or editing the script in any way). Once I do that, it starts working again as expected.

Has anyone else run into this behavior? Is this a known bug with Tag Change Event scripts, or is there a recommended workaround to ensure the scripts will run reliably?

Are you sure your code isn't stalling? Tag Change Events are assigned a single thread to process events (in order), and if the code blocks for any reason, no more events are processed. You should look at a thread dump the next time it gets stuck. (Or open a support ticket to help with this analysis.)

Thanks for the response, It didn't get stuck in last 2-3 days. I'll check the thread dump when it happens.

I noticed that the tag change event has become stuck again, this time following a gateway restart. I captured a thread dump, but I couldn’t find any references to tag-change scripts in it. Additionally, none of the threads were in a BLOCKED state. Could you advise if there are any specific areas I should investigate further?

For context, my script is being invoked asynchronously from within the tag change script.

Also, after the gateway restart, inside Diagnostics->Scripts->Gateway Scripts-> Tag Change, the "Last Execution" of my tag change script is showing as "NEVER".

Post your complete script and the thread dump.

If you cannot, you should open a support ticket.

ok, thanks!