-
-
Notifications
You must be signed in to change notification settings - Fork 44
Description
I've been struggling with an instability issue on my OctoPrint instance, where, from time to time, the system runs out of memory. After some debugging, I managed to isolate the issue to the Obico plugin, specifically the ffmpeg
process.
It seems that when I have the streaming enabled (which is the purpose of Obico), the ffmpeg
process is automatically spawned and slowly consumes memory until OctoPrint crashes due to out-of-memory issues.
This process takes a few days before memory pressure starts causing instability in the entire system, eventually leading to OctoPrint crashing and failing the print.
I isolated this issue by letting the system run for some time with and without the Obico plugin enabled, which led me to open this issue.
To mitigate this problem, I set up a cron job to kill the ffmpeg
process every day.
To Reproduce
Steps to reproduce the behavior:
- Enable Obico streaming.
- Monitor the
ffmpeg
process and check the memory it is consuming. - After a couple of days, check the
ffmpeg
process and notice the sudden increase in memory. Depending on the interval, you may already be experiencing swapping problems due to a lack of available memory. - If you don't kill the
ffmpeg
process, OctoPrint will eventually crash.
Screenshots
Day 0 - Enabled Obico streaming - ffmpeg
is consuming almost 4% of memory, which is fine.
Day 1 - After 27 hours, the ffmpeg
process is already taking up almost 30% of memory.
Desktop (please complete the following information):
- OS: OctoPi 1.0.0 & OctoPrint 1.9.3 (new camera stack)
- Browser: Chrome
- Obico Version: 2.4.9
Additional context
- I'm a paying customer of the Obico solution, so I have premium streaming enabled.
- I don't know if it is related, but I reported another issue related to OctoPrint reporting lots of errors on the Obico plugin: link to the GitHub issue