Gateway scripts stalling

I have a gateway script that has stopped executing. For example, the status page says last execution was 5 days ago with a duration of 6 ms and s status of Success. But that timer should execute every 15 seconds, so why did it stop for 5 days? One thing is that I have two scripts, one every 5 seconds, and the second 15 seconds, they are not Shared as I was told that it could be a problem, so they are dedicated. So can someone explain to me why Ignition cannot execute two simple scripts and that we have to put man power to verify this every time it decides to stop by itself. The only way to resolve this is to connect to Ignition designer and save the project so It would re-initialize the timers. There has to be a better way, also note that there is no error logs. Last one is about 6 months ago, not 5 days.

We have also seen this once. But there was too much noise in the logging, and we couldn’t reproduce it. So we never got in touch with support about this.

If you can reproduce it, you should definately contact support though.

Get a thread dump next time you notice this happening. I’ve never seen a case where scripts just up and stopped running. Usually they are blocked indefinitely on something, like a database call on a JDBC driver that doesn’t ever timeout by default.

Concur. Every single case I’ve encountered where scripts fail like this was due to programmer error. Most commonly an edit to a script module that introduced syntax errors. You get one logged error for that script failing to import then everything that depended on it goes silent. Particularly if your programmers are importing scripts into other scripts instead of using fully-qualified names everywhere.

Perhaps you could manage the two script from a single timer thread with a counter, if that improves the performance?

There is no error on the script but there is an JDBC driver call. I added a new timer script that would reset the jdbc connection if there is a problem, i’ll see what that does. It also turns a bit to 1 saying that the script is running, so I see that the script is still 1 and calling the script puts it to 0 because the exit from the script will put it to 0 if its grater than a certain value, but the script won’t run still, so not sure yet, I may have to restart the Gateway script by name if there is such a function.

I did not find any timeout parameter on the JDBC connection, is that part of the Connection String? Or Should I put this in the Extra Connection Properties?

Which JDBC driver are you using and what version is it? Whether there is a property to control this and what it’s named will depend on the driver.

Perhaps it's related to your database issue: Can I use a script to reconnect a database?

Maybe solving that will solve both.

Exactly same here today with 8.0.15.