Gateway Timer scripts mysteriously stopped

I have two Gateway Timer scripts which both stopped running yesterday. According to the Gateway Scripts Status page, one posts requests to an URL at 30 second intervals, and last executed at 12:14:51; the other checks a directory for new files every 10 seconds, and last executed at 12:15:18. These are the only two active scripts on this Gateway.

I’ve taken a look in the logs, and I don’t see anything indicating a problem at those times, or at the times that I would have expected them to execute again. Both scripts are set as Enabled, they’re just not running.

Should I just disable and then re-enable them to start them up again? And what else can I look for to figure out why this happened?

Can you grab a thread dump and post it here? You can do this at the bottom of the Console > Threads page.

The dump is attached.


Well, my guess is that since you’re using a shared timer for the Asheville project, that one of the scripts is stuck trying to read from a socket during an HTTP Post call you made in one of your scripts, and the others simply aren’t getting a turn to run right now.

Unfortunately the httpPost() scripting call has no timeout parameters like the httpGet() one does, so we’ll have to add those…

The device that I’m posting to did have a “critical error” as the users put it, and they rebooted it, so maybe the timing was just right to get that script stuck on the read. In the meantime, can I prevent this from recurring by changing the script to run in a dedicated thread? Or will that not make any difference? Is there a global setting that could give me a timeout value in place of the missing parameter?

And to get this running again, do I disable and then re-enable it?

Yeah, you’ll probably need to disable/enable, maybe with a project save mixed in there somewhere.

You could set each timer script to dedicated for now, which would mean that if it got hung up again only that one would be affected, but the real solution will be to wait for 7.6.4 which will have connect and read timeout parameters for the httpPost() call.

I actually just downloaded 7.6.4-rc2 as that is supposed to fix a problem we’ve been having with Allen-Bradley devices. But I assume this fix will be in a future release candidate.

Yeah, hopefully rc3. If not that then final.