Boron: Is daily System.reset() good hygiene?

Quick question for Borons that are always connected to the Particle Cloud and always running their "loop" with the following enabled:

SYSTEM_THREAD(ENABLED);
SYSTEM_MODE(AUTOMATIC);

Would a built-in daily System.reset() be good overall hygiene?

1 Like

@sensorcheck ,

This is a great question.

I have devices that are set up like this and have run for years without a regular system reset.

My preference is only to reset for a reason as resetting can bring its own issues. I look for things like: running low on memory, persistent connectivity issues, sensor malfunctions and then decide if a reset might fix the issue.

Interested to learn about what others think.

Thanks,

Chip

2 Likes

I started resetting the system monthly, years ago before joining this forum. My reasoning for this was that I was not sure I was coding well enough to deal with millis() and allow it to rollover properly, among other things.

@rickkas7 posted a tutorial about properly coding to handle rollover: https://community.particle.io/t/millis-and-rollover-tutorial/20429

I adopted the techniques he and others talked about on the subject (thanks for that!). But, you know, I still kept performing the monthly reset in firmware, for the most part.

Another thing I do is enable an outOfMemoryHandler() and reset when an error flag occurs. Here is a posting which was valuable reading to me: https://community.particle.io/t/ram-space-running-out/63756

Thank you to all for the contributions!

2 Likes

I do have my devices reset once a week, just in case I have a memory leak. Since the cellular connection stays active during a System.reset(), reconnection normally just takes a few seconds, which is fine in my application.

5 Likes

oh, that's a very cool detail to know. Thanks

3 Likes

I also do the same, but I was embarrassed to admit it again publically.
I'm not embarrassed at all now......somewhat proud :grinning:

5 Likes

Does device reset also cause device console statistics to be reset? I think yes, which is a good thing for understanding how much elapsed time such statistics as cloud disconnects represents.

For all of the reasons given I'm testing a daily reset. Since thanks to all contributors!

1 Like