Closed tombenton55 closed 3 years ago
Same here. I had to turn off the power to the pi. all versions before were without problems.
Interesting. What configuration are you running? What version of homebridge? node? npm? To confirm, you updated and restarted homebridge and saw the increase in memory? Is it stable or does it drop?
Using homebridge 1.2.3 and node 14, the active memory decreased ~10MB (read: within error bars) between 3.5.18 and 3.6.1. The big difference in this release is that I'm now using the HTTP/2 TLS socket APIs instead of H1. But that's a function of Node primarily.
I'm using homebridge 1.2.3 on a pi4 2gb with node 14.15.0 As soon as I enabled the live view memory/cpu usage went crazy and stayed at 67-73%. Turning it off didn't help return it to normal. Plugin had to be uninstalled and reinstalled to fix.
Plugin without liveview has been absolutely flawless, I just got curious.
Node.js Version v14.15.0 Npm Version v6.14.8 Homebridge 1.1.6
Raspberry Pi 3B+
the re-install fixed the memory usage? After you did the update, did you restart homebridge?
yes, the Homebridge has been restarted. The Pi also had to be restarted. Then reinstall the plugin. The same problem after a while. Didn't reinstall the plugin.
oh you mean the cpu + ram didn't spike immediately, but grew after a period of time?
Yes exactly. It ran for a few minutes and suddenly the homebridge was unreachable, not even via ssh
Oh. I think I misunderstood. You are using live view and found the cpu and memory go up. Is this correct? But under normal operation it doesn't?
Live view uses ffmpeg to transcode the stream and so requires a high amount of cpu and memory to transcode and encrypt to meet HomeKit camera requirements.
Can you confirm the use case you are finding this?
If you are finding the high cpu/memory when not in live view, can you tell me if you are using a higher thumbnail refresh rate? Or the standard 10min when armed?
Exactly. This was a live view specific situation. If it’s normal behaviour then fine. But should it ramp up even when the stream is exited?
On Mon, 16 Nov 2020 at 23:01, Colin Bendell notifications@github.com wrote:
Oh. I think I misunderstood. You are using live view and found the cpu and memory go up. Is this correct? But under normal operation it doesn't?
Live view uses ffmpeg to transcode the stream and so requires a high amount of cpu and memory to transcode and encrypt to meet HomeKit camera requirements.
Can you confirm the use case you are finding this?
If you are finding the high cpu/memory when not in live view, can you tell me if you are using a higher thumbnail refresh rate? Or the standard 10min when armed?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/colinbendell/homebridge-blink-for-home/issues/25#issuecomment-728381842, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANWINUR75IP2IUNNESOMFZDSQGVNZANCNFSM4TW36OLA .
It might take a bit. But not long. Check the logs id it persists.
So for me the Pi is frozen twice in the default settings. Before, all versions ran without problems. I have now removed the plugin.
So for me the Pi is frozen twice in the default settings. Before, all versions ran without problems. I have now removed the plugin.
Same situation here. Since the last update to 3.6.1 with no config changes this happens.
same here:
I'm having the same issue and was able to get the CPU back down to normal levels by manually killing the ffmpeg process. From the behavior I noticed, it looks like ffmpeg starts when you click on a camera in the Home app for live view (even if you've disabled it) but the plugin doesn't kill the ffmpeg process automatically once live view is exited.
Thanks. I probably need to add a watcher to make sure the SIGINT/SIGKILL is properly sent. (PRs are always welcome ;)
Is there something new? I have this problem too.
Tried this plugin today and seeing the same. CPU usage was around 4%, now it's around 50%. Could it be it's trying to stream the camera feeds in the background?
The root cause is that the single frame image is being looped in ffmpeg and this process isn't getting killed gracefully. I haven't had time yet to add a timeout mechanism to clean up these events. (Usually happens when you go into the camera and then to settings). I'm planning to come back to this in the next week or so.
The root cause is that the single frame image is being looped in ffmpeg and this process isn't getting killed gracefully. I haven't had time yet to add a timeout mechanism to clean up these events. (Usually happens when you go into the camera and then to settings). I'm planning to come back to this in the next week or so.
@colinbendell No worries. This is awesome. If I had time I could help as well.
Same issue here, installed the plugin, when configured saw an increase to 100% of CPU Usage and 1.2 Gb or ram used by ffmpeg, I use a RPI 4 2Gb with node v12.20.0 and latest version of Homebridge.
I had to remove the plugin to get CPU and RAM to normal level, removing only the plugin configuration did not work.
Exactly the same issue for me too. CPU maxed out and the batteries in the camera got drained. Looks like a bug is keeping the live feed open
Any update on this?
Yeah, Any update? Unable to use as CPU shoots to 97% and will not go down until FFMPEG zombie process are killed.
should be resolved in v3.7
Updated to the latest version and my cpu went from 2% to 67% memory has increased too. Had to uninstall as I don’t have a cooling solution yet. Thought I’d flag it just incase.
Edit seems to be related to live view, I’ve reinstalled and disabled it for now and cpu everything is back to normal.
I’m using the new outdoor cam, I don’t need live view I was just testing it as the plug-in updated. Perhaps this is normal.
Sorry for my lack of technical ability