Skip to content
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

High Memory Usage/Memory Leak #468

Closed
cpw7922 opened this issue Mar 29, 2024 · 7 comments
Closed

High Memory Usage/Memory Leak #468

cpw7922 opened this issue Mar 29, 2024 · 7 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@cpw7922
Copy link

cpw7922 commented Mar 29, 2024

Describe the bug
I am running HA in Docker and when I have the Dreame integration enabled it causes high memory usage which eventually results in a memory leak.

To Reproduce
I removed all of my 3rd party/HACS integrations for 24 hrs and the container memory hovered around 500 MB. I started re-enabling some integrations with no issues but as soon as I enabled the Dreame integration it jumped to over 1000 MB.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
Red Arrow is when I enabled the Dreame integration
Dreame Memory

This is what the memory leaks look like
3i5zdicg35qc1

Additional Information (please complete the following information)

  • Model Name [e.g. dreame.vacuum.p2028]: Dreame L10 Pro
  • Firmware Version [e.g. 1156]: 4.1.8_1138
  • Home Assistant Version: 2024.3.3
  • Configuration Type [With or without map support]: With Map Support
  • Errors or warnings shown in the HA logs (if applicable):
    Entity camera.rosey_map (<class 'custom_components.dreame_vacuum.camera.DreameVacuumCameraEntity'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <CameraEntityFeature: 0>, please create a bug report at https://github.com/Tasshack/dreame-vacuum/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
@cpw7922 cpw7922 added bug Something isn't working question Further information is requested labels Mar 29, 2024
@Tasshack
Copy link
Owner

This is normal behaviour. Integration uses lot of memory for making Python viable for generating digital images otherwise it would be too slow.
High memory usage and memory leak are two different things and I don't see any indication of memory increasing overtime (in a couple of days or weeks) and reach the maximum the system can provide.
It is also normal that the memory usage does not drop when you disable the integration until reset because HA does not remove the entities when you do that so there isn't any indication to the integration that it needs to free the resources.
If you system cannot provide this much memory, you can enable the Low Resolution Map configuration option which has been added to the Beta for create a solution for this issue.
And lastly, 600mb - 1000mb is nothing compared to the Mi Home and Dreamehome app uses on your phone.

@Tasshack
Copy link
Owner

#52

@cpw7922
Copy link
Author

cpw7922 commented Mar 30, 2024

I get that it might need a good amount of RAM but it keeps consuming more until it’s using about 3GB and then crashes HA

@Tasshack
Copy link
Owner

Are you using the latest Beta?

@Tasshack
Copy link
Owner

Also can you share the full HA log until the crash?

@Tasshack Tasshack reopened this Mar 30, 2024
@Tasshack
Copy link
Owner

Tasshack commented Apr 1, 2024

I have released a new version, may or may not fix your issue.

https://github.com/Tasshack/dreame-vacuum/releases/tag/v2.0.0b13

@Tasshack Tasshack closed this as completed Apr 1, 2024
@cpw7922
Copy link
Author

cpw7922 commented Apr 5, 2024

Sorry for the confusion on this. I had the integration fully uninstalled and the memory leak happened again while I was out of town this week so looks like it's not the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants