Closed Baldhor closed 1 year ago
Whoever sent this report, please show up and if possible explain as much as you can :)
Happen often? What symptoms before it happens? ...?
My Homey Pro 2016 is struggling to keep up. Although I'm not the one who submitted the manually submitted report, I can imagine it could be something like that...
My Homey Pro 2016 is struggling to keep up. Although I'm not the one who submitted the manually submitted report, I can imagine it could be something like that...
@RoadXY Can you check in homey developpers: https://tools.developer.homey.app/tools/app-profiling
For me, the cpu is near zero, but I notice after a long time that the memory keep increease (however, I'm mostly on the new wizard version, not the one you use)
I think the problem come when reconnecting, in a previous fix, I modified how reconnection is handled. Now I rebuild a new low level client everytime.
The problem is that the listeners on the old low level client are not removed before destroying it ... so actually it is not destroyed!
My Homey Pro 2016 is struggling to keep up. Although I'm not the one who submitted the manually submitted report, I can imagine it could be something like that...
@RoadXY Can you check in homey developpers: https://tools.developer.homey.app/tools/app-profiling
For me, the cpu is near zero, but I notice after a long time that the memory keep increease (however, I'm mostly on the new wizard version, not the one you use)
I checked and you are right: ESPhome app never uses more then 1%.
I think the problem come when reconnecting, in a previous fix, I modified how reconnection is handled. Now I rebuild a new low level client everytime.
The problem is that the listeners on the old low level client are not removed before destroying it ... so actually it is not destroyed!
I think you're right! The point where the graph is going down was a reboot of Homey.
@RoadXY Yes, the app crasahed at 60Mo, it's the max allowed! Obviously one (or more) memory leak, and as we already know your DSMR disconnect often :)
For info, the new wizard is live! :)
And I just published live a fix for this memory leak (hopefully)
Updating 😎
@RoadXY Please check the insigth graph again a few hours after updating, so we know if there are more leak. Seems your configuration make the leak "very high" :)
Yes, I will
Yes, I will
But you need to upgrade to 1.0.3 (1.0.2 doesn't have the memory leak fix)
Yes, I saw that 😉
Most of my device were offline and then I saw this:
@RoadXY How is that possible!? lol
Can you use console.re and try to understand what could be the root cause? like you restart the app, and then you wait 5 minutes, then check without touching anything what is going on? I suppose your DSMR send the same message again and again, so fast that the application doesn't have time to clean up memory (that's the main issue with modern garbage collector based programming).
To be honest, I don't see what change I made in the backend that could lead to this issue. I almost didn't change anything there.
It really is going like crazy 😧
To be honest, I don't see what change I made in the backend that could lead to this issue. I almost didn't change anything there.
It could be there the whole time, as far as we know?
It really is going like crazy 😧
@RoadXY I cannot see anything wrong there, the sate are sent every 30 seonds or so Ok it's many states, but not so many either. => The problem doesn't come from the physical device
I need to simulate it, then I can find where the problem come from
So I did this to try reproduce:
20 random sensor which update every 30 seconds!
Looks way more promising! At 22:55 I updated to version 1.04. At 6:00 today I rebooted Homey
@RoadXY I now have 20 temperature native capabilities updating every 10 seconds. 10 of them are linked to a virtual device:
restart the app at 12:26 ... no obvious leak at all!
When I added the 10 capabilties to the virtual device, the memory gone up a lot:
So maybe there are a leak there, but then it's related to the "add new capability" process, not 'runtime'.
Conclusion: the fix on reconnection was actually the good solution => problem solved! Agree?
Dang it!
I disabled console.re, could it have something to do with that? Which was working but 8 hours later it didn't so I disabled it.
@RoadXY I don't have this kind of issue, if I enable/disable console.re. And for me console.re is stable, however sometimes their server stop working for whatever reason.
@RoadXY Let's say that's a good joke ... I just checked the code of the ConsoleReService, I have a nice consolereEnabled property, which is correctly initiated and so on! I use it to check if I should connect or not to the console.re server!
But never to judge if I should add the log in the queue to send ...
https://homey.app/fr-fr/app/nl.inversion.esphome/ESPhome/test/ certification will be for tomorrow
Memory usage has never been so low lol I feel shame to be honest lol
Don't look back! It's a feature, not a bug
I'm closing this issue:
I think it's obvious enough, since 9pm yesterday, the memory is just much more stable than ever.
Describe the bug I received a crash report from a user (who?) This report state a CPU warning Limit Reached, meaning that the app used lot of cpu for a long time, which seems surprising ... I need more information