After a period of time - Timer in edge workflow doesn't fire


#1

Hi

We have an edge workflow (reads modbus) that is triggered by a timer and after about 12 hours it has ceased to fire.
Re-dploying the workflow has no affect.

I also have HTTP trigger for the same workflow and works fine.

Difficult to diagnose :wink:

Thanks

T


#2

I found it, sending it shortly


#3

That’s definitely something we’d like to investigate. Can you please zip up and email us the edge agent’s log. By default it will be in the /data folder that you mounted in when you ran the container.


#4

Unfortunately the log doesn’t exist for that period any more ;-(

After I rebuilt the workflow I noticed that the date on the system had gone backwards.

My guess is the agent couldn’t fire as the current time had reversed.


#5

I found something - but not sure if it goes back far enough -
How would you like it sent ?


#6

Please zip it and send it to support@losant.com.

The system time changing is most likely the issue. The timer does use the system time to determine when to fire, even for simple intervals. When a timer fires, it calculates the next time it should fire based on the system’s time. When that time occurs, it fires again. This mechanism allows both the simple timer and the much more advanced “every day at 2pm” configurations to use the same underlying timer system.

If the date were reset back several hours, the timer system would still be waiting for the time it calculated the last time it ran.


#7

Yep that sounds like the problem. Hard to diagnose until I logged into the device.
Do you still want the log file ?


#8

Yeah, that would be difficult to diagnose. We could probably send the system time through an edge agent’s “hello” message to the cloud and then display a warning if the system time if off by too much. We’ll think about a solution there.

Let’s assume for now the system time was the issue. If you do experience it again, make sure to grab the log file while it’s happening and then go ahead and email that to us.


#9

Sounds like a plan.

Luckily we always have a VPN connection to these edge devices :wink:

T


#10

Oh you might like to know we are actaully polling an RS485 serial device -
using mbusd to act as the serial proxy. So the workflow can talk to the device given the MODBUS node is TCP.


#11

Oh nice. That sounds like a really clean solution. Did you bundle up mbusd into another docker container or are you running it on the host system?


#12

Currently in the host, but will move it into a container.

I have redis in another container and a python script performing I2C to get analog and binary data, which hsets that to redis,

The edge workflow merges the modbus and redis data.

Just had the timer fail to fire - date not wrong so sending a log


#13

Ok, we’ll take a look.