Chat freely about anything...

User avatar
By liderbug
#76078 I've been running in to a problem setting up an ESP8266 as a web server. It seems that after a ?period of time? or ?X number of http requests? the chip hangs / becomes non-responsive. I've sort of created a work around by "count++" for every http and "if (count > number) ESP.restart". Which is a bit heavy handed.

Google says I'm not alone, refs to memory leak etc. There is the command "server.begin" and I was hopping to find "server.stop/restart/quit/" - no luck. So I'm wondering if there is any other way to communicate with a 8266. SSH? Telnet? Ftp? Just not http.

Another question: code: respond to a http request and some kind of "flush" after it?
Thanks
User avatar
By fritserasmus
#76531 I have a similar issue, so allow me to add details, perhaps someone with knowledge might spot the reason:

So I have 5 NodeMCUs reading temperatures from a DS18B20 temperature sensor and send this reading every 500 ms via MQTT to mySQL db.
When I reset/power down and up the readings are sent and logged just fine.

Then the problem:
For no reason at no specific frequency (from 1 hour to 30 hours) the NodeMCU will just stop sending readings.
I can see it when I monitor traffic via MQTT and missing entries in the db.

Sometimes a NodeMCU will after say another 20 hours start to send readings but die again.

I am using more than one APs, but they are being used by other devices without issues
User avatar
By McChubby007
#76532 I have been working on a high resolution trace tool, which can also record memory usage over time. It's been a long slog and it's not quite ready for everyone to use, but I thought I would mention it here, and that I will try to get it done as quickly as possible. This will make such issues way faster to identify. The trace data is imported into chrome trace and you get something like the attachment, which can be zoomed down to microsecond detail. Works on es8266, uno, linux also.
Attachments
FnAndObjTrace.png
Chrome trace