Gateway-tags-eventscripts

Hi everyone

We are extensively using tag change value script. Thoses script does a lot of thing and are very usefull because they can be coded in UDT. So when we create a new instance of a UDT, all the scripts are automaticly created.

Now the problem is when many tags change values at the same time, we experiment some lags in the script execution.

We look in the threads page and the is 3 threads that seem to execute all the change values script:
gateway-tags-eventscripts-3,
gateway-tags-eventscripts-2,
gateway-tags-eventscripts-1

Is there a way to increase the number of threads that are responsible to execute thoses scripts?

1 Like

Add an override for ignition.tags.scriptthreads to the ignition.conf file, in the wrapper.java.additional settings, then restart the gateway.
wrapper.java.additional.<x>=-Dignition.tags.scriptthreads=5

Try to keep the changes sane - giving yourself a hundred event script threads is not going to help performance, and is actually a terrible idea. There’s often a better way to structure things to avoid bogging the event executors down (ie, using async threads spawned from event scripts can be the better approach; it depends entirely on what these scripts are doing)

1 Like

I’m trying to increase the maximum thread number to 5 using the syntax you gave but it does not work…

Is that syntax correct?
wrapper.java.additional.<7>=-Dignition.tags.scriptthreads=5

I also tried:
wrapper.java.additional.<7>=-Ignition.tags.scriptthreads=5

Still no more than 3 threads…

Thanks.

You don't put the angle brackets. Follow the lead of the other parameters in your config file.

Still does not work.
Here is the complete option block:

# Java Additional Parameters
wrapper.java.additional.1=-XX:+UseConcMarkSweepGC
wrapper.java.additional.2=-XX:+CMSClassUnloadingEnabled
wrapper.java.additional.3=-Ddata.dir=data
wrapper.java.additional.4=-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
#wrapper.java.additional.5=-Xdebug
#wrapper.java.additional.6=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
wrapper.java.additional.5=-Dignition.tags.scriptthreads=5

What am I missing?

The last line should look like this:

wrapper.java.additional.7=-Dignition.tags.scriptthreads=5

The “D” in “Dignition” is not a typo?

No, it’s supposed to be there.

Hum... Ok I'm trying the exact line wou gave me and it's not working.

Just to let everyone know…

Finally we had to update our gateway to make it work. We were using 7.9.3 and now we use 7.9.9. I think it is impossible to have more than three threads until 7.9.5.