Flexy reboot When Connect with M2Web

I am trying to connect to our units and there are a number of them that are rebooting when I try and connect to the web interface. They all seem to have the same error message that caused the reboot.
Reboot reason:not enough memory.

Attached is a backup from one of the units.MOVED TO STAFF NOTE (351 KB)

Hello @tedsch,

Are you running the same basic program on all of the devices? It looks like you are running out or ram from everything you have setup.

Deryck

We are running the same program for all.

This could be a difficult one to track down you have a good amount of different functions setup. It would be good to see if we can identify if the reboot happen in a particular part of your code running. Could a few of the ONCHANGE calls all be getting called at the same time? Do you have a way to cause the reboots to happen?

Your backup only showed one reboot, but it was a minute after receiving an mqtt message. It does look like their was someone remoted into the device. Adding a remote connection interacting with the webpage could be what is putting it over the RAM limit.

It might help us identify the issue by reducing the amount of event logs from your script while also setting some up to let us know what part of the code your device is in. This should at least help us see if scripting is causing the memory issue. Removing the @log in MQTTReceiveMsg() might be a good start.

I am checking with development to see if there are any know bugs that could be causing this.

Deryck

Hello Ted,

Reviewing this with the Belgium team we are wondering when this started happening and how often is it occurring? Any recent changes to your scripts before it started to occur?

From the backup we can see the Bootloader is old. I recommend updating to FW 14.3, this update has a bootloader update included so the bootloader can be updated with a standard update. This might could with the memory leak.

Deryck

Just started noticing that it was happening enough times to be annoying. So I can not say when it started happening.

Our last major change to the basic script was in July of this year.

Firmware 14.3 is still in PR so we will not be installing that on units in production.

Looking at their setup we are thinking something in your scripting is causing a memory leak which eventually causes the reboot.

I will need to look into if I can simulate your scripting locally and recreate the issue. Once we can recreate it we should be able to track it down.

Are there any particular task you notice you run and cause the reboots to to happen?

Deryck

Hello @tedsch,

We have had your script running and haven’t see any reboots on our unit.
Have you noticed how often the device is rebooting?

You can also do a recover locally with the units using the current firmware, this will also update the bootloader.

Deryck

The reboots would happen sometimes when I was connecting to the unit through M2Web.

Not sure what you are referring to when you say a “recover locally”? Would this be to take a backup of a unit and then restore the unit through eBuddy? Or actually doing the recovery through the eBuddy Tools? Seems like this would not be something that could/should not be done to the remote units. Not a good solution when there are over 100 out in the wild.

Yes updating the bootloader would be done via eBuddy locally connect to the Ewons LAN. It is the standard recovery process. If you would like to try this on a device I can provide more detailed instructions.

FW 14.3 will update the bootloader with a standard update. This allows the bootloader to be updated remotely with a standard update. The bootloader was not included in prior updates.

Deryck

Hi Ted,

We just had an update for an issue related to m2web and KPI’s. While I didn’t see any KPI’s enabled in your backup, im wondering if this could have still been causing issues with your devices. The update occurred today. Can you let me know if this seemed to help your reboot issue?

Deryck

The issue still remains. I connected to 12 devices yesterday and five of them rebooted. Some had the not enough memory message in the log others just said unknown power loss.

I turned off some of the logging that was being done from the basic script and will check again next week sometime.

Hi Ted, With FW 14.3 officially released I would like can you try updating to this version on some of the devices seeing this issue to verify if this resolves the reboots you are seeing?

Deryck

Hi Ted,

Deryck is out on vacation right now but I wanted to check if there was any update on this ticket?

-Tim