Finding a Boron module with LED flashing green

Hello,

I have product that has based off the Boron404X. The hardware is on test in our lab and has been powered for months. I went to check on the device and found that the LED on the Boron404X was flashing green. Looking online, it looked like the last time the unit was heard from one October 18, I am posting this on October 21. I was under the assumption that the unit will try to attempt to reconnect to Particle on its own. I power cycled the unit and it quickly connected to Particle cloud and I can interact with the device. This also seemed to happen back on October 1.
The boron is running DeviceOS 6.1.0. Does anyone else seem similar issues?
Any suggestions? Since the unit is in house I can connect to it again if this happens again.
Thanks.

The most common reason for a device to fail to reconnect but succeed immediately after pressing the reset button is a memory leak. Once the available to memory falls to very low levels the device won't be able to connect, but also does not automatically reset to clear leaked memory. Using an out of memory handler can help by resetting the device when this happens.

Thanks for the suggestion.

So when I compile my code here is what I see.

text data bss dec hex
120980 286 14564 135830 21296

Looking on the product page, I see the following:
image

I have added code to my application that follows the example of out of memory handler.
I am not using malloc, new, or strdup in my code.
My plan is to monitor the unit over the next period of time and see if i see that the available memory drops over time.

If there are any other suggestions please let me know.

Thanks.

Another good technique is to add this to your code:

SerialLogHandler logHandler(LOG_LEVEL_TRACE);

If a device get into the bad state, connect a laptop by USB and view the USB serial logs for a few minutes before resetting it. The log may have the reason why it's failing to connect.

I just found my test device in this state again. I checked to see what amount of memory was available and got a response of the following when connected to the device via USB:
1462530077 [app] INFO: freeMemory=85392
1462534460 [net.pppncp] ERROR: Failed to initialize cellular NCP client: -210
1462545077 [app] INFO: freeMemory=85392
1462550760 [ncp.client] ERROR: No response from NCP
1462560077 [app] INFO: freeMemory=85392
1462575077 [app] INFO: freeMemory=85392
1462576460 [net.pppncp] ERROR: Failed to initialize cellular NCP client: -210
1462590077 [app] INFO: freeMemory=85392
1462592760 [ncp.client] ERROR: No response from NCP
1462605077 [app] INFO: freeMemory=85392
1462618460 [net.pppncp] ERROR: Failed to initialize cellular NCP client: -210
1462620077 [app] INFO: freeMemory=85392

I had not implemented your suggestion of

SerialLogHandler logHandler(LOG_LEVEL_TRACE);

but I will be adding it now. Any other suggestions?

The trace log would be good. You have enough free memory so it's unusual that the NCP could not be initialized. After 10 minutes it should power down the modem which will completely reset it, so the log entries of that happening would be useful.

Is there anything else that I can read more about how this works?
I would like to know more about "After 10 minutes it should power down the modem which will completely reset it, so the log entries of that happening would be useful."

I had put the out of memory handler in place as you suggested as well (earlier). I am guessing that didn't catch this error.