-
Notifications
You must be signed in to change notification settings - Fork 98
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
[Bug] Causing memory leak #783
Comments
Does this occur with older versions? I'm not (yet) seeing any memory increase in my test HA instance running inside docker although I'm only been monitoring it for a short while. Does turning on debug logging shed any light on what might be causing the leak? |
I don't know, but I hadn't seen any home assistant crashes due to memory
that I can remember (if you can pardon the pun). And then this week it's
all been caused by this integration that I can see as when it's disabled my
instance is stable, and when it's switched on I get daily crashes, if not
multiple times a day
…On Sun, 1 Dec 2024, 18:00 AdrianGarside, ***@***.***> wrote:
Does this occur with older versions? I'm not (yet) seeing any memory
increase in my test HA instance running inside docker although I'm only
been monitoring it for a short while.
—
Reply to this email directly, view it on GitHub
<#783 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQ6G5LVPJ4NZRIVTJZQN4YD2DNFFFAVCNFSM6AAAAABSY2RFN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJQGE3TIMJRGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Did you recently update the HA version or the integration version? Or is the sudden instability out of the blue without updating either? |
@AdrianGarside The attached system monitor log shows quite clearly when the disabled printers were re-enabled this evening. Memory use has jumped significantly and is gently creeping up (it will not stop). |
What are you running that on? |
Dell 3040 Micro, i5 6500T, 16Gb RAM. Running Proxmox. HA in a VM. |
@jbeardon can you post the integration diagnostics and enable debug logging to see if anything is listed there that could shed light on this? Does the memory increase correlate with activity (such as printing). Does it stop if you disable the camera? |
Will do - I will however need to kill the integration before I go to bed. HA crashing overnight will not be acceptable to she who must be obeyed! |
Diagnostics from one of the configs (let me know if you want all of them). |
This may have a bearing! |
OK, so digging further. I've got 3 P1Ps, 2 A1s and an A1 Mini. |
Yes. One of your printers (a P1P) didn't have working credentials any more so it was repetitively trying to connect and failing. So any memory leak in that path would go from noise to significant. You also got rate limited by cloudflare accessing the bambu cloud APIs due to that repetitive activity. I'll need to think how to better handle that state. |
Going through configure would automatically take working credentials from one of the other integration instances and fix up the broken one. |
Curious this occurred because the credentials have not changed and it did seem to coincide with the update to 2.0.38 but it may just be a coincidence. After the re-start, memory use has dropped back down to below 2Gb and is not spiking so all appears well again. Thanks for poking me in the right direction to get it fixed 👌 |
@spasypaddy I expect you're hitting the same authentication problem as you're configured for bambu cloud mqtt connection and the diagnostics log has no successful data retrieved from your printer: A debug log would confirm this. |
That second connection failed error should have been being flagged in the home assistant UI and helped us understand this even without debug logging enabled. Did HA not flag the error from the integration? |
@AdrianGarside, Unfortunately, I can't be sure but I cannot remember seeing anything related to the Bambu integration in the logs when this problem arose. As you say, it would have also given me a reason to delve further myself. |
I have the same issue on an Rpi4 homeassistant keeps crashing and rebooting completely ever 1-1,5hours - no more crashing since disabling this integration |
Have you tried re-authenticating? That was the fix for my issue. |
I removed my printer and readded it (did a reauth in the process) will see if it crashes again |
Home Assistant Version
2024.11.3
Bambu Lab Integration Version
v2.0.38
Describe the bug
For some reason this week the integration has started causing a memory leak on my raspberry pi 4, cant explain why. When its disabled my memory usage stays in the 50% range, with it on it climbs constantly until the PI crashes and home assistant goes down.
To Reproduce
Borrow my home assistant set up on a raspberry pi? No idea...
Expected Behaviour
No memory leak
What device are you using?
P1S
Diagnostic Output
Log Extracts
No response
Other Information
No response
The text was updated successfully, but these errors were encountered: