IottaWatt Reboot: Heap memory has degraded below safe minimum

Hi My IottaWatt seems to be rebooting regularly. It is running 2.4.2 firmware.

Here is the log:

SD initialized.
11/01/19 00:21:08z Real Time Clock is running. Unix time 1572567668
11/01/19 00:21:08z Reset reason: Software/System restart
11/01/19 00:21:08z Trace: 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:1[4], 1:2[5], 9:0[5], 9:0, 9:1, 8:4, 8:6, 8:8, 8:9, 9:3, 9:5, 9:9, 1:2, 1:3, 10:2, 10:3
11/01/19 00:21:08z ESP8266 ChipID: 191732
11/01/19 00:21:08z IoTaWatt 4.x, Firmware version 02_04_02
11/01/19 00:21:08z SPIFFS mounted.
10/31/19 19:21:09 EmonService: Invalid configuration.
10/31/19 19:21:09 Local time zone: -5:00
10/31/19 19:21:09 device name: IottaWatt
10/31/19 19:21:10 MDNS responder started for hostname IottaWatt
10/31/19 19:21:10 LLMNR responder started for hostname IottaWatt
10/31/19 19:21:10 HTTP server started
10/31/19 19:21:10 WiFi connected. SSID=myssid, IP=192.168.4.15, channel=6, RSSI -61db
10/31/19 19:21:10 timeSync: service started.
10/31/19 19:21:10 statService: started.
10/31/19 19:21:10 Updater: service started. Auto-update class is MINOR
10/31/19 19:21:10 dataLog: service started.
10/31/19 19:21:11 dataLog: Last log entry 10/31/19 19:21:05
10/31/19 19:21:11 Updater: Auto-update is current for class MINOR.
10/31/19 19:21:15 influxDB: started, url=192.168.50.10:8086, db=energy, interval=10
10/31/19 19:21:18 influxDB: Start posting at 10/31/19 19:21:00
10/31/19 19:22:10 historyLog: service started.
10/31/19 19:22:10 historyLog: Last log entry 10/31/19 19:21:00
10/31/19 20:36:51 Heap memory has degraded below safe minimum, restarting.

** Restart **

SD initialized.
11/01/19 01:36:53z Real Time Clock is running. Unix time 1572572213
11/01/19 01:36:53z Reset reason: Software/System restart
11/01/19 01:36:53z Trace: 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:1[13], 1:2[14], 9:0[14], 9:0, 9:1, 8:4, 8:6, 8:8, 8:9, 9:3, 9:5, 9:9, 1:2, 1:3, 1:4, 1:5[21], 21:0, 21:1, 21:10, 21:10
11/01/19 01:36:53z ESP8266 ChipID: 191732
11/01/19 01:36:53z IoTaWatt 4.x, Firmware version 02_04_02
11/01/19 01:36:53z SPIFFS mounted.
10/31/19 20:36:54 EmonService: Invalid configuration.
10/31/19 20:36:54 Local time zone: -5:00
10/31/19 20:36:54 device name: IottaWatt
10/31/19 20:36:55 MDNS responder started for hostname IottaWatt
10/31/19 20:36:55 LLMNR responder started for hostname IottaWatt
10/31/19 20:36:55 HTTP server started
10/31/19 20:36:55 timeSync: service started.
10/31/19 20:36:55 statService: started.
10/31/19 20:36:55 dataLog: service started.
10/31/19 20:36:56 dataLog: Last log entry 10/31/19 20:36:50
10/31/19 20:37:00 influxDB: started, url=192.168.50.10:8086, db=energy, interval=10
10/31/19 20:37:03 WiFi connected. SSID=myssid, IP=192.168.4.15, channel=6, RSSI -63db
10/31/19 20:37:03 Updater: service started. Auto-update class is MINOR
10/31/19 20:37:04 Updater: Auto-update is current for class MINOR.
10/31/19 20:37:06 influxDB: Start posting at 10/31/19 20:36:30
10/31/19 20:37:55 historyLog: service started.
10/31/19 20:37:55 historyLog: Last log entry 10/31/19 20:36:00

Any ideas what may be causing?

Thank you,

Dan

Hi Dan,

It does happen from time to time. I’ve setup heap monitoring on systems and spent a lot of time trying to figure out where the leak is. My current belief is that there is no memory leak in the IoTaWatt code, but that there are issues in the IP stack that lose memory handling atypical events. Using passwords also has seemed to cause heap degradation, although not always.

But it usually takes days or weeks to degrade to critical levels. Your log shows it happening after 24 minutes. That’s not a WiFi or password issue. I see in the log that there is a problem with your Emoncms configuration. That’s where I’d start looking for trouble.

That should be fixed and if the problem persists, I’ll take another look. If you don’t believe you have Emoncms configured, or don’t know how to find the problem, send me your config.txt file in a PM and I’ll fix it.