-
-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak / Causing HA to freeze #74
Comments
Actually there is no memory leak but the RPI3 does not have enough ram for rendering the map image with using python. This is a known issue and duplicate of the #52 |
I think this issue is related to the |
Actually (sadly) I have to stick to "force cloud", since the robot is on another network. |
I will try to repoduce this issue on my setup and fix it if i can. |
Hello @Tasshack, I'm using a RPI3 with 1 GB of RAM and I'm also having these issues (also related to #52 and other duplicated issues). Some more detailed info:
I think this is a very important point to analyze, also considering that a lot of people have installed HA on RPIs. Then, all of us will use your amazing work done on reverse engineering the official Mi Home. Btw I'll follow the updates on #52 (comment). Let's consider that I am totally available for any further clarification on my setup. |
@antoniolanza1996 thanks for the feedback. Can you try the integration without map support for understanding the actual reason of memory leaks? |
I tried the integration without map support. It found out around 50 entities and no problem at all. I'm using HA without any trouble. |
@Tasshack I'm still using the integration without map support and no problem at all. As supposed, map is the problem here. I'm here for further support if needed. |
I have a hang-up problem with my RPI4 when I turn on to display "path" on map. everything works perfectly without this parameter |
Please check that your device has enough memory on board. |
@StahlTim @antoniolanza1996 can you test this issue on the latest beta version. https://github.com/Tasshack/dreame-vacuum/releases/tag/v2.0.0b5 |
problem persists on beta 2.0.0b5 with rpi3 |
@tjuanma I need more information to fix this issue because i cannot reproduce it on my test setups. Are you seeing any warnings or errors in the HA log? |
I have the same issue on a Raspberry Pi 4 (4 GB) with v1.0.1. It started when I was moving furniture about and placed the robot (dreame.vacuum.p2028) upside down, causing the integration setup to fail (after reboot). Memory leak is a bit over 100 MiB/hour. I reckon the repro steps are:
The log is spammed roughly every 90 seconds with the message below. I'll try beta 2.0.0b6 to see if anything changes.
|
@ImpieYay thanks for the information. I have noticed the memory leak when HA is trying to start the integration and fails. It should be fixed on the beta, are you using the beta or stable release? |
This was with stable release v1.0.1 - but I'm currently testing beta 2.0.0b6. |
That was the only case that I found causing memory leak but i am sure that wasn't the main reason of this issue because it only happens when HA cannot reach the device initially after started. |
Same problem here with 2.0.0b6 on a Debian HA core installation: After starting HA with my Dreame D10 Plus offline, the HA log is spammed with the message quoted above by @ImpieYay. This creates more and more stale CLOSE_WAIT TCP-sessions leading to a HA crash after a few hours. Low resolution map on or off doesn't make a difference here. |
@HAisibora thanks for the information. PS. This is my first python project and I am used to working with C/C++ which requires all memory management handled by the programmer but I don't know how to handle the garbage collector on Python. |
Hi, same problem for me with 2.0.0b6. i have raspberry 3b on last raspbian light with HA 2023.10.5 core 2023.10.5. Have an error when i add integration in version 2.0.0b6 => ": {« message »:« Invalid handler specified »}" Error occurred loading flow for integration dreame_vacuum: No module named 'paho' So i install paho-mqtt in my virtual python environnement pip3 install paho-mqtt (dont know if should setup https://www.home-assistant.io/integrations/mqtt/) Now i can add my entitie, i setup with my Dreame credentials but have a memory problem : And it's strange but when i desactivate my vacuum entity , the memory stay high and i should restart HA for fix the memory. So i have more 400 MiB when i use service + vacuum entity with Dreame credentials. When have time, i will look the code if i can help too. It's goog project. |
I have fixed this on both |
Describe the bug
The integration produces error messages in a regular basis (few minutes / couple of seconds apart). Furthermore, the RAM and SWAP of the system steadily gets filled up. Once it reaches 100%, the system does not respond anymore.
To Reproduce
Disconnect the robot (power off the robot or toggle WIFI off)
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots / Log
Additional Information (please complete the following information)
The text was updated successfully, but these errors were encountered: