Cronplus AGAIN: System Time Change Detected

Many times, my system is very slow on startup and logs are filled with this message:
"System Time Change Detected - refreshing schedules! If the system time was not changed then this typically occurs due to blocking code elsewhere in your application"
RP time is synchronized (NTP) but I think that it's not the origin of the problem.
To my mind, it's a lock.
Currently, Nodered hosts many flows (backend, dashboard) with different plugins.
My point is : what are the best practices to:

  • EASILY detect lock (please don't answer `disable one by one ....Ě€
  • monitor memory usage, lock ....
  • make nodered platform easily observable (which flow consumes RAM, which plugin)
  • make plaform with many flows stable on long term journey

I have already use nodejs tools for to rack memory usage but I wisk something more efficient for NR platform

System:
RP3b
NR 4.0.8
node-red-contrib-cron-plus 2.1.0

Many thanks

Divide and conquer. Disable half, then half of half etc.

But the first place I'd look is for for loops in function nodes, and flows that loop back on themselves, and large data processing (e.g. image data, audio data, video data) and lastly and large database queries (the node may be written badly and doing blocking requests instead of async)

No magic tool.
It will be a long journey to understand what is happening

You could try switching logging to "trace" in the settings file. I think that shows when each node is executed. In theory, the stuff just before the warning should be responsible.

After it is up and running does it still use a lot of CPU?

step by step i have identified the problem

see bug report in node-red-contrib-ical-events

1 Like

Note that the Cron node is simply an innocent messenger in this. It is noticing that something is locked and warning you about it.

1 Like

System Time Change Detected

in v2, the env var CRONPLUS_MAX_CLOCK_DIFF can be set to a higher ms value. Default is 5000.

Adjusting the detection parameter is not a solution, it is simply masking an issue with some CPU hogging code.