Jellyfin Forum
Library scanning disables connection to unRaid - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: General Questions (https://forum.jellyfin.org/f-general-questions)
+--- Thread: Library scanning disables connection to unRaid (/t-library-scanning-disables-connection-to-unraid)



Library scanning disables connection to unRaid - riisager - 2024-07-30

Hello

I am new to using Jellyfin, and I have encountered a problem. I have a unRaid server, where I have just installed the binhex Jellyfin docker.

I opened up the webui, setup the server and activated the library scanning. It found some movies, but after a couple of minutes I completely lost contact to the server.

I tried restarting the server and the library scan a couple of times, but it was the same result each time.

Any of you experienced this situation before?

BR Riisager


RE: Library scanning disables connection to unRaid - TheDreadPirate - 2024-07-30

Can you share your Jellyfin log via pastebin? Also, why the binhex docker and not the official docker?


RE: Library scanning disables connection to unRaid - riisager - 2024-07-30

See here: https://pastebin.com/t1m2y7TE

This is just what I was able to get. It seems that at some point the ffprobe just crashes something, that makes me unable to connect to the server. I can however still ping the server.

FYI, I changed the docker to the official one, but the problem still occurs


RE: Library scanning disables connection to unRaid - TheDreadPirate - 2024-07-30

Can you share the full log?  Also, can you look at the unRAID logs to see if there is anything going on in the OS to cause this?

   


RE: Library scanning disables connection to unRaid - riisager - 2024-07-30

i'll get back to you. I have an exam in a couple of days, so firstly need to focus on that. This problem has already taking to much of my study time


RE: Library scanning disables connection to unRaid - riisager - 2024-08-04

Update:

I have realized what the problem is. Jellyfin is eating ALL the RAM. I was watching the resource windows and exactly as the RAM usage went to 100 % the server stopped responding.

I can see from this post you are also answering "https://forum.jellyfin.org/t-excessive-ram-consumption" that it might be the ffmpeg probe which would make sense. I have 8 thread, so it would be running 16 ffmpeg probes. and with big 4K files sometimes at the 50-60 GB size I could imagine this would eat a lot of RAM.

I've tried to add a "--memory: 20g" flag to limit RAM usage, but it did nothing. It keeps climbing to 90 percent, before I manually stop the docker.

What is the correct way to solve this?


RE: Library scanning disables connection to unRaid - TheDreadPirate - 2024-08-04

How much RAM does you have and how much RAM does the container have access to?  My jellyfin rarely goes about ~2.5GB of reserved memory.  When adding a lot of new content, ffmpeg threads can consume a lot of memory.  But playing back a file  the ffmpeg process should not consume more than a few hundred MB of memory.

   

Can you ensure that this environment variable is set in the container?

MALLOC_TRIM_THRESHOLD_=131072


RE: Library scanning disables connection to unRaid - riisager - 2024-08-04

I can see that the MALLOC_TRIM_THRESHOLD_=131072 enviroment variable is already set.

My system has 32 GB of RAM. It is indeed because Jellyfin is in the process of adding my entire library, so it launches a lot of ffmpeg probes this ends up consuming all my memory.

I tried limiting the container to 20 gb of memory with the enviroment variable "--memory=20g" (maybe it is not correct?). This did not work.


RE: Library scanning disables connection to unRaid - TheDreadPirate - 2024-08-04

You can also limit the number of library scan threads in Dashboard > General: Parallel library scan tasks limit and Parallel image encoding limit


RE: Library scanning disables connection to unRaid - riisager - 2024-08-05

Thanks! That worked a treat!