ESP32: Possible scripter memory leak #20430
Replies: 7 comments 6 replies
-
For finding the culprit it is necessary to rule out where to search. Use without Ethernet. |
Beta Was this translation helpful? Give feedback.
-
I have followed @Jason2866 's advice and stripped back almost 100% of my script and found a simple way to demonstrate the issue, which seems to have nothing to do with the dual network interfaces: just a SCRIPT problem. SETUP:
Test ProcessSimply fetched the MAIN Tasmota page, with WGET. Used this bash script:
TEST 1 - SUCCESSZero drop of heap over 400 web gets of main Tasmota page.SCRIPT
TEST 2 - FAILHeap dropped form 97->48kB over 400 web gets of main page. (ran bash script twice)= approx 0.12kB per web get
Here is the plot of the heap while the script ran twice. I am on holidays and have no access to my Visual Studio to built a new Tasmota binary on the latest release to confirm this memory leak bug has not already been fixed. Should I raise a new issue anyway? |
Beta Was this translation helpful? Give feedback.
-
Jason, Headline updated. Script(s) Adding Would like to add
|
Beta Was this translation helpful? Give feedback.
-
@gemu2015 Can you help? |
Beta Was this translation helpful? Give feedback.
-
Thanks |
Beta Was this translation helpful? Give feedback.
-
Fixed: See This PR: #20473 |
Beta Was this translation helpful? Give feedback.
-
@UBWH We are hunting for root cause of reboot after~5 Min in #22833 Would you perhaps have a link to instructions "how to monitor free heap" as shown in your graph ? |
Beta Was this translation helpful? Give feedback.
-
There seems to be a memory leak in V3.1.0 - I suspect in the SCRIPT code??? (EDIT: or maybe the Ethernet code ???)
In the above plot (over 7 days) - the main drops occur when I display the >w0, >w2, ... Web pages defined in my SCRIPT
I am at a loss to workout what to do next.
The MQTT messages are still flowing out - even with only 4kB of heap left (thats how I know how much heap is left - and can plot on OpenHAB)
But I can NOT login to the main web page. Browser just times out waiting for data.
EDIT: Browser timing out started when heap dropped below about 20 kB
Suggestions on how to fix this?
EDIT: Using WT32-ETH01, with 4 MB memory, and Ethernet port.
Beta Was this translation helpful? Give feedback.
All reactions