# Tag point monitoring

**URL:** <https://forum.inductiveautomation.com/t/tag-point-monitoring/86086>\
**Category:** Ignition\
**Created:** [February 21, 2024, 9:36am UTC](https://forum.inductiveautomation.com/t/tag-point-monitoring/86086 "2024-02-21T09:36:51Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![cj3687\_L](https://avatars.discourse-cdn.com/v4/letter/c/54ee81/32.png) [@cj3687\_L](https://forum.inductiveautomation.com/u/cj3687_L)\
**Post date:** [February 21, 2024, 9:36am UTC](https://forum.inductiveautomation.com/t/tag-point-monitoring/86086/1 "2024-02-21T09:36:51Z")

</div>

As shown in the figure, we have monitored the trigger points of multiple tags, and now we have encountered a problem. The trigger of the point has been monitored, but it has not been included in the processing method. What may be the cause of this problem. Each script runs for about 4-5 seconds.

 ![81239124](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/c/7c8f2c579ab8b4bedbcad36db858e4a48ee33c9a.png)  
 ![5](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/8/88a75847209bbcf2267f2f3a6a60dfe1b4b9715e.png)

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [February 21, 2024, 10:09am UTC](https://forum.inductiveautomation.com/t/tag-point-monitoring/86086/2 "2024-02-21T10:09:43Z")

</div>

I have no idea what you're asking.  
What's the problem here ?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 21, 2024, 12:43pm UTC](https://forum.inductiveautomation.com/t/tag-point-monitoring/86086/3 "2024-02-21T12:43:52Z")

</div>

Tag change event scripts in gateway scope use one thread per defined event. If many of the subscribed tags change in a short period of time, they will be executed in order. Are you sure an event was missed?

---

<div class="post-metadata">

**Author:** ![Sheng\_YD](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Sheng\_YD](https://forum.inductiveautomation.com/u/Sheng_YD)\
**Post date:** [February 21, 2024, 3:48pm UTC](https://forum.inductiveautomation.com/t/tag-point-monitoring/86086/4 "2024-02-21T15:48:12Z")

</div>

Yes, our script is like:

```auto
def xxx():
   tagpath = "result"
   try:
        # do something
        system.tag.writeBlocking(tagpath, 1)
   except:
        system.tag.writeBlocking(tagpath, 2)

```

We can see that the points configured in the gateway events have changed in designer, but the result point has not changed at all. At the same time, there are no error or warning in gateway logs, and the CPU and memory status of the server are also normal.  
Most of the time, the script can be executed normally, but occasionally there are missed events.Could it be related to the long running time of the script?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 21, 2024, 4:02pm UTC](https://forum.inductiveautomation.com/t/tag-point-monitoring/86086/6 "2024-02-21T16:02:25Z")

</div>

> [@Sheng\_YD](#):
>
> be related to the long running time of the script?

Yes. You should check the running event scripts in the gateway web interface. Also, consider logging the tag currently being acted upon when you start and end a particular event. And look for any possibly related errors in the gateway logs.

---

<div class="post-metadata">

**Author:** ![wang](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wang/32/58470_2.png) [@wang](https://forum.inductiveautomation.com/u/wang)\
**Post date:** [February 22, 2024, 3:05am UTC](https://forum.inductiveautomation.com/t/tag-point-monitoring/86086/7 "2024-02-22T03:05:49Z")

</div>

How many threads can the Ignition Gateway's tagchange handle, because some scripts take too long and we need more threads to handle different situations

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [February 22, 2024, 3:21am UTC](https://forum.inductiveautomation.com/t/tag-point-monitoring/86086/8 "2024-02-22T03:21:12Z")

</div>

> [@wang](#):
>
> How many threads can the Ignition Gateway's tagchange handle,

Ignition does not impose a limit on the number of threads that can be created by Gateway tag change scripts. So this is ultimately dependent on the hardware (virtual or otherwise).

At some point the number of concurrent threads that can be running will be exhausted (note this is inclusive of all processes running on the hardware not just Ignition) when that happens the threads will be cached until available memory is exhausted. This is hard to estimate when you know the hardware specs, without knowing them it's impossible.

So best guess is "several".

> [@wang](#):
>
> some scripts take too long

What is "too long".

---

<div class="post-metadata">

**Author:** ![wang](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wang/32/58470_2.png) [@wang](https://forum.inductiveautomation.com/u/wang)\
**Post date:** [February 22, 2024, 7:50am UTC](https://forum.inductiveautomation.com/t/tag-point-monitoring/86086/9 "2024-02-22T07:50:06Z")

</div>

We modify the tag change in the gateway and save it, but the tag signal is triggered at the same time when saving it. Will this affect the reception of the tag signal point?

---

<div class="post-metadata">

**Author:** ![wang](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wang/32/58470_2.png) [@wang](https://forum.inductiveautomation.com/u/wang)\
**Post date:** [February 22, 2024, 7:52am UTC](https://forum.inductiveautomation.com/t/tag-point-monitoring/86086/10 "2024-02-22T07:52:03Z")

</div>

That is, the logic of executing the script takes about 4-5 seconds, and I do not know whether the trigger signal is not received because of the longer time

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 22, 2024, 12:42pm UTC](https://forum.inductiveautomation.com/t/tag-point-monitoring/86086/11 "2024-02-22T12:42:35Z")

</div>

> [@wang](#):
>
> tag signal is triggered at the same time when saving it

That is normal, and there is a flag given to the event that marks it as an "initial change", so you can handle it differently if necessary.

> [@wang](#):
>
> many threads can the Ignition Gateway's tagchange handle

Each tag change event defined in a project gets one thread of its own, shared among all of the tags in its subscription list.

> [@wang](#):
>
> I do not know

Add logging to start and end of every event, indicating which tag is being processed. Then you will know.
