Jellyfin Forum
SOLVED: OOM Errors related to Jellyfin - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: SOLVED: OOM Errors related to Jellyfin (/t-solved-oom-errors-related-to-jellyfin)



OOM Errors related to Jellyfin - RoyalFaceMelter - 2025-02-09

I have posted about this here before and I THOUGHT the issue was resolved, but no appearantly not. I am not even sure if it's Jellyfin related, but the UnRAID system logs always mention Jellyfin so I wanted to create a new thread on it.

So I put all of my logs from the 05:00 hour this morning on Pastebin:
https://pastebin.com/bXNB8rZk
-- I suggest cntrl+f Jellyfin, it's a ton of logs.


Here's my Jellyfin docker run:
https://pastebin.com/cEEjwXGB




Please let me know anything else you might need to help.


RE: OOM Errors related to Jellyfin - TheDreadPirate - 2025-02-10

Can you check if this environment variable is set?

Code:
MALLOC_TRIM_THRESHOLD_=131072

On the command line you'd use this command to see all of a container's environment variables.

Code:
docker exec -it jellyfin env



RE: OOM Errors related to Jellyfin - RoyalFaceMelter - 2025-02-10

(2025-02-10, 01:38 PM)TheDreadPirate Wrote: Can you check if this environment variable is set?

Code:
MALLOC_TRIM_THRESHOLD_=131072

On the command line you'd use this command to see all of a container's environment variables.

Code:
docker exec -it jellyfin env

I don't see the MALLOC_TRIM,

Here is the output of the command you provided:


docker exec -it jellyfin env 

PATH=/1siopy/bin/usr/local/sbin/usr/local/bin/usr/sb
HOSTNAME=7f7f8b3441ce
TERM=xterm
HOST_HOSTNAME=HomeServer HOST_CONTAINERNAME=jellyfin
JELLYFIN_PublishedServerUrl=http://192.168.1.130:8096
PUID=99
PGID=100
UMASK=022
TZ=America/Chicago
HOST_OS=Unraid
HOME /root
LANGUAGE=en_US.UTF-8
LANG=en_US.UTF-8
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0
S6_VERBOSITY=1
S6_STAGE2_HOOK=/docker-mods
VIRTUAL_ENV=/lsiopy
LSIO_FIRST_PARTY=true
NVIDIA_DRIVER_CAPABILITIES=compute,video,utility


RE: OOM Errors related to Jellyfin - TheDreadPirate - 2025-02-11

Set the environment variable "MALLOC_TRIM_THRESHOLD_" (including the underscore at the end) with a value of 131072.


RE: OOM Errors related to Jellyfin - RoyalFaceMelter - 2025-02-13

(2025-02-11, 01:12 PM)TheDreadPirate Wrote: Set the environment variable "MALLOC_TRIM_THRESHOLD_" (including the underscore at the end) with a value of 131072.


Hey, one question:

I haven't set the MALLOC_TRIM_THRESHOLD_ variable yet. This morning I did upgrade my RAM in my server to 64GB (rather than 16GB)...do you think/or recommend that the MALLOC_TRIM_THRESHOLD_ variable should still be necessary? I guess I am not sure what it does, that's why I am asking.


RE: OOM Errors related to Jellyfin - TheDreadPirate - 2025-02-13

It should always be added. Jellyfin can still use a lot of memory with or without that env variable (usually from ffmpeg), but the env variable will help ensure it doesn't grow out of control unnecessarily. It's configures Jellyfin/DOTNET's memory management functions.


RE: OOM Errors related to Jellyfin - RoyalFaceMelter - 2025-02-13

(2025-02-13, 03:11 PM)TheDreadPirate Wrote: It should always be added.  Jellyfin can still use a lot of memory with or without that env variable (usually from ffmpeg), but the env variable will help ensure it doesn't grow out of control unnecessarily.  It's configures Jellyfin/DOTNET's memory management functions.


Alright, I got that env. variable set. Hopefully with the RAM upgrade and that variable, I'll finally be in the clear. Thank you so much for your help on this, and thanks for taking the time to explain what the change did.