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

RAM leak #601

Closed
Anth0ny29 opened this issue May 31, 2024 · 8 comments
Closed

RAM leak #601

Anth0ny29 opened this issue May 31, 2024 · 8 comments
Labels
Invalid Bug/Enhancement not related to integration or already available.

Comments

@Anth0ny29
Copy link

Anth0ny29 commented May 31, 2024

Description

Hello!

I've noticed that RAM usage on my RPi3b+ keeps increasing when using the TAPO integration for my C200 camera. I recently switched to a NUC thinking my Raspberry Pi was the problem, but the issue persists.

In the provided screenshot, the available RAM gradually decreases until it either causes my Raspberry Pi to restart or completely crash. After disabling the integration, the problem seems to have disappeared.

Is this a known issue?

I don't have any specific errors, except for some camera sensors taking more than 10 seconds to update.

Screenshot_20240531-091009

Reproduction Steps

1 - Integrate C200 Tapo Camera with the integration
2 - Wait a few hours and see if the RAM usage goes up

Expected behavior

No RAM leak

If applicable, add error logs.

No response

Device Firmware

1.3.13 Build 240327 Rel.63336n(4555)

Integration Version

5.4.13

Using stream component

Yes

Does camera work via official integrations?

Yes

Camera has all attributes filled out in developer tools

Yes

HASS Environment

RPI 3B+ and NUC

Search for similar issues

Yes

Additional information

No response

@Anth0ny29 Anth0ny29 changed the title RAM leak with integration RAM leak May 31, 2024
@JurajNyiri
Copy link
Owner

Could you try disabling most of the features under integration options? Onvif, time sync etc to see if we can identify the area causing the leak.

@JurajNyiri
Copy link
Owner

IMG_1393

I can see something similar on my system as well but I have not verified whether it’s caused by this integration or not.

@JurajNyiri
Copy link
Owner

As a first step please keep it off for a longer period to definitely conclude it is caused by this integration as in your screenshot the without Tapo part is very short.

@Anth0ny29
Copy link
Author

I will disable the integration for a longer period, and I will get back to you when I have more information!
I wanted to at least bring up the topic for investigation :)

@JurajNyiri
Copy link
Owner

Thank you for that! I will try to investigate code in the meantime to see if I can find anything. If you find it is caused by Tapo, under configuration for the device under settings:

  • Disable motion sensor
  • Disable webhooks
  • Disable automatically sync time
  • Disable sound sensor
  • Disable media sync

if the problem stops, start enabling again
If the problem does not stop, I know which areas are not causing the leak at least.

Memory leaks are very hard to track down usually.

@Anth0ny29
Copy link
Author

Small Update: I left most of the day without the Tapo integration (until I launched a RAM profiler which crashed everything) and apparently the RAM continues to gradually increase. It does seem slower though, which might be why I thought it was caused by the plugin.
So, I don't know if this is normal or not, and whether it's actually a problem in the end. Maybe everyone experiences this but after a while it goes down on its own (and my RPI3B+ was just limited with 1GB of RAM).
Tapo disabled

@JurajNyiri
Copy link
Owner

Hi @Anth0ny29 any luck in here? Can we close this or is this an issue?

@Anth0ny29
Copy link
Author

Hello! I wanted to wait and see in the long run, but apparently the RAM usage increases and then seems to stabilize after a while. Maybe my Raspberry Pi lacked RAM and the NUC can handle the RAM demand over the long term. I think we can close the topic. Anyway, thanks for looking into it :)

image

@JurajNyiri JurajNyiri added the Invalid Bug/Enhancement not related to integration or already available. label Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Invalid Bug/Enhancement not related to integration or already available.
Projects
None yet
Development

No branches or pull requests

2 participants