Replies: 6 comments 13 replies
-
Expected behavior depends a lot on what you're doing on it. However, due to garbage collection, tracking Here's an example of a garbage collection message (with
No memory issues on that system, while running for weeks without booting. With a "normal memory leak", I'd not expect to see the fragmentation going down gradually. Obviously, it looks suspicious with the |
Beta Was this translation helpful? Give feedback.
-
@sfromis @stefanbode |
Beta Was this translation helpful? Give feedback.
-
Your question about a possible memory hole is to unspecific. It needs a more detailed look.
Currently there is just a statistic showing a memory decreases. Not more not less. |
Beta Was this translation helpful? Give feedback.
-
I changed the command for tracking memory from (using berry)
to (without berry) with following result (Phase 5) Memory seems to be stable now. Is this all a Berry-Issue ? |
Beta Was this translation helpful? Give feedback.
-
I'm not convinced of that. Maybe my idea of GC is different from yours. GC runs constantly in the background. There is initially no reason to actively initiate this. I tried following test class test
def init()
print("class created")
end
def deinit()
print("garbage collection done")
end
end
xxx = test()
xxx = nil Console-Output
Unnecessary instances are automatically cleaned up after 20 seconds at the latest. On a controller with tasmota32.bin without an application and a working GC,
will not result in a permanent loss of memory . Am I wrong ? |
Beta Was this translation helpful? Give feedback.
-
@stefanbode The command |
Beta Was this translation helpful? Give feedback.
-
A few weeks ago I created a Bluetooth application with Berry.
Since Bluetooth requires a lot of memory, I created an image with the Tasmo-compiler to have more memory available. After about 14 days, the controller's WEB server was no longer accessible.
I suspected low memory.
I recorded the memory history via Node-Red using following command
http://tasmota-635c38-7224/cm?cmnd=br%20tasmota.memory()
Properties heap_free and frag should be tracked.
The comments below describe the changes to the previous phase
Phase 1:
The controller runs with my Berry application.
As soon as the free memory falls below 20k, instabilities occur (web page can no longer be accessed)
Phase 2:
My Berry application does not start in this scenario.
However, the free memory decreases over time.
Phase 3:
BLE has been disabled. Here too, the free memory is reduced over time.
Phase 4:
The official release 14.1.0 (tasmota32.bin) was flashed to a NodeMCU32. Here too, the free memory is reduced.
As a workaround, I configured an auto-restart after 7 days.
Is this a memory leak?
What is the expected behavior?
Thank you for your hints.
John
Beta Was this translation helpful? Give feedback.
All reactions