-
-
Notifications
You must be signed in to change notification settings - Fork 91
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] memory leak when recording #265
Comments
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid. |
This needs to be reported to them, it's not going to be an issue with the container. More likely how you've configured tvheadend or the app itself. |
Does TVHeadend, including webinterface, stops responding at all, so you need to restart the container? I installed my first Docker/Portainer environment on Debian 12 for TVHeadend container some days ago, am happy with live TV, but as soon as I start recording, the webinterface gets unresponsive. When there are scheduled recordings for the actual time and the recording volume is present at next reboot, the container crashes instantly. A mounted volume has owner root:root after starting the container, but TVHeadend is running as "abc". In my logs there is "access denied" for dvr process. |
You should be creating the volumes before you deploy a container as docker will create them as root. |
@ldlx it seems as though your problem is that tvheadend doesn't have the rights to write the recordings... The web interface doesn't freeze for me, but after some time the tvheadend process consumes over 7 GB of RAM and then the OOM killer kills tvheadend. I also tried to recreate the container with a new config. I only setup one tuner and mapped a single channel for testing to test recordings, and here, too, the memory leak is showing. |
added uid and gid "911" to the connect string of the CIFS volume in Portainer, which is the "abc" user inside the container. The CIFS volume is now mounted for the "abc" user and recording is working. Please excuse that I hijacked your issue. |
@ldlx if it works for you now, do you also have a memory leak when you record? |
No, there is no memory leak (=no release of memory when recording is done), but obviously more memory is needed when recording. Virt and Res of tvheadend preocess in TOP inside the container stay in the same range (Virt: 280000-300000, Res: 120000-135000), buff/cache has higher values during recording, but returns to lower values. And at last, free memory increases when the recording ends. |
Interesting, I'll try setting up a new VM. That's the only thing I can think of that I haven't tried yet. I'll do that in the next few days and write an update here. |
Already mentioned what needs to be done here. |
Who do you mean exactly? |
We take what tvheadend publish on their GitHub and package it into a container. Any memory leaks will be at their codebase, not ours. Though as other users here have mentioned no memory leaks, makes it seem like it's settings within tvheadend triggering it. |
I had two recordings that suddenly stopped last night. I started a new recording some minutes ago and can see the increasing memory usage in the stats like @COhsrt posted (I still learn to use Portainer and now I know the stats page ;-)) But: According to TOP, the application's memory is stable, but "buff/cache" is increasing. Is there a way to control the max size of the cache? |
@ldlx the kernel inbuilt oom-killer of my docker-host killed tvheadend. And actually no. it's an issue with the container. the tv-headend process uses around 60 MB. ![]() But the container eats a lot more memory over time. ![]() what may be interesting: the recording and config files are on a nfs share and not on the docker-host itself. maybe this gives a hint on a possible issue? An additional screenshot of the memory-usage from the docker-host ![]() |
Is there an existing issue for this?
Current Behavior
Memory leak when recording
Expected Behavior
No memory leak
Steps To Reproduce
Just record something
Environment
CPU architecture
x86-64
Docker creation
Container logs
you can't see anything about it in the logs
The text was updated successfully, but these errors were encountered: