Ignitions edge 8.1.1 high CPU and Memory

Dear all good day,

We are facing an issue with an ignition edge 8.1.1 version which consumes more than 75% CPU and almost 3.5GB of memory of the 4GB allocated in ignition.conf

On the status page – threads we see a lot of the following messages.

Quote

Thread [gateway-tags-eventscripts-3] id=74, (BLOCKED)
app//com.inductiveautomation.ignition.gateway.tags.runtime.nodes.FolderNode.getChildTag(FolderNode.java:315)
app//com.inductiveautomation.ignition.gateway.tags.runtime.nodes.FolderNode.getChildNode(FolderNode.java:331)
app//com.inductiveautomation.ignition.gateway.tags.runtime.TagEvaluationManagerImpl.locate(TagEvaluationManagerImpl.java:137)
app//com.inductiveautomation.ignition.gateway.tags.TagProviderImpl.writeAsync(TagProviderImpl.java:555)
app//com.inductiveautomation.ignition.gateway.tags.model.impl.GatewayTagManagerImpl.lambda$writeAsync$13(GatewayTagManagerImpl.java:693)
app//com.inductiveautomation.ignition.gateway.tags.model.impl.GatewayTagManagerImpl$$Lambda$2587/0x00000008010f2040.map(Unknown Source)
app//com.inductiveautomation.ignition.gateway.util.GroupMapCollate.lambda$groupMapCollateIndexed$5(GroupMapCollate.java:53)
app//com.inductiveautomation.ignition.gateway.util.GroupMapCollate$$Lambda$2586/0x00000008010f2c40.apply(Unknown Source)
java.base@11.0.7/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
java.base@11.0.7/java.util.HashMap$EntrySpliterator.forEachRemaining(Unknown Source)
java.base@11.0.7/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
java.base@11.0.7/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
java.base@11.0.7/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
java.base@11.0.7/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
java.base@11.0.7/java.util.stream.ReferencePipeline.collect(Unknown Source)
app//com.inductiveautomation.ignition.common.util.Futures.sequence(Futures.java:26)
app//com.inductiveautomation.ignition.gateway.util.GroupMapCollate.groupMapCollateIndexed(GroupMapCollate.java:62)
app//com.inductiveautomation.ignition.gateway.tags.model.impl.GatewayTagManagerImpl.writeAsync(GatewayTagManagerImpl.java:677)
app//com.inductiveautomation.ignition.gateway.script.LegacyGatewayTagUtilities.writeToTagsImpl(LegacyGatewayTagUtilities.java:533)
app//com.inductiveautomation.ignition.gateway.script.LegacyGatewayTagUtilities.writeToTagImpl(LegacyGatewayTagUtilities.java:523)
app//com.inductiveautomation.ignition.common.script.builtin.LegacyTagUtilities.write(LegacyTagUtilities.java:290)
jdk.internal.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
java.base@11.0.7/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.base@11.0.7/java.lang.reflect.Method.invoke(Unknown Source)
app//org.python.core.PyReflectedFunction.call(PyReflectedFunction.java:188)
app//com.inductiveautomation.ignition.common.script.ScriptManager$ReflectedInstanceFunction.call(ScriptManager.java:523)
app//org.python.core.PyObject.call(PyObject.java:497)
app//org.python.core.PyObject.call(PyObject.java:501)
org.python.pycode.pyx247.valueChanged$1(tagevent:valueChanged:17)
org.python.pycode.pyx247.call_function(tagevent:valueChanged)
app//org.python.core.PyTableCode.call(PyTableCode.java:171)
app//org.python.core.PyBaseCode.call(PyBaseCode.java:308)
app//org.python.core.PyFunction.function___call
(PyFunction.java:471)
app//org.python.core.PyFunction.call(PyFunction.java:466)
app//org.python.core.PyFunction.call(PyFunction.java:461)
app//com.inductiveautomation.ignition.common.script.ScriptManager.runFunction(ScriptManager.java:821)
app//com.inductiveautomation.ignition.common.script.ScriptManager.runFunction(ScriptManager.java:805)
app//com.inductiveautomation.ignition.gateway.tags.scripting.TagScriptManagerImpl$FunctionInvokerImpl.run(TagScriptManagerImpl.java:527)
app//com.inductiveautomation.ignition.gateway.tags.scripting.events.AbstractTagScript.invoke(AbstractTagScript.java:34)
app//com.inductiveautomation.ignition.gateway.tags.scripting.TagScriptManagerImpl$Task.invoke(TagScriptManagerImpl.java:476)
app//com.inductiveautomation.ignition.gateway.tags.scripting.TagScriptManagerImpl$TagScriptDispatcher.run(TagScriptManagerImpl.java:439)
app//com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$ThrowableCatchingRunnable.run(BasicExecutionEngine.java:518)
java.base@11.0.7/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
java.base@11.0.7/java.util.concurrent.FutureTask.run(Unknown Source)
java.base@11.0.7/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
java.base@11.0.7/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.base@11.0.7/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.base@11.0.7/java.lang.Thread.run(Unknown Source)

unquote

we have the same exact installation on 51 edge systems but we are facing this issue only with one.

Tag event scripts. Common programming error. These scripts are not allowed to do anything complicated or that take more than a millisecond or three, as the thread pool is shared, and if plugged, will bog down your whole system.

The .getChildTag() call suggests that some tag event script is doing one of the system.tag.browse* operations, which can be very time-consuming. Don't do that.

Thank you for your answer.

My problem is how to find which script is causing the problem cause there are more than 200 scripts running.

should i search for write.blocking and assign a specific timeout on the script?

Search for system.*.browse*. Possibly also search for system.*.*query* (case insensitive) and system.net.* to catch a bunch of other time-consuming stuff. Don't use any of these in tag events. Use a project's tag change event and/or re-architect the events to not need a time-consuming callout.