Jellyfin Forum
Library Scan Failing - 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: Library Scan Failing (/t-library-scan-failing)

Pages: 1 2 3


Library Scan Failing - adampdx - 2024-08-13

I recently moved around some files on my drives and subsequently had to recreate two of my libraries. I recently noticed excessive hdd use, and after some investigation, realized it was Jellyfin trying repeatedly to scan one of the libraries and failing. It's throwing an out of memory error, and I think that Jellyfin is also filling up the swap memory.  That's speculation, but after a restart with the JF container stopped, the swap is clear until I start JF. Overall, the program is fine. It will play everything else without issue. I scanned the HDD that the library is on and found no issues. The other library is on another HDD. Any help would be great!  Thanks.

Pastebin
https://pastebin.com/J4eqQbjx


RE: Library Scan Failing - TheDreadPirate - 2024-08-13

Try limiting the number of threads jellyfin uses during a library scan.

Dashboard > General, Parallel library scan tasks limit and Parallel image encoding limit. Set both to 1 for testing.


RE: Library Scan Failing - adampdx - 2024-08-13

That resulted in basically the same outcome, the only difference in the logs is that it seemed to crash a little sooner in the process.


RE: Library Scan Failing - TheDreadPirate - 2024-08-13

Can you describe your server? Specs and OS?


RE: Library Scan Failing - adampdx - 2024-08-13

I'm running Jellyfin as a Docker container on Ubuntu 22.04 Desktop. My system is a a mini pc with a i5-1235u (6 core 12 thread), 32 gb RAM.


RE: Library Scan Failing - TheDreadPirate - 2024-08-13

Are you restricting how much RAM the container can use? Which image are you using? The official jellyfin/jellyfin image or the Linuxserver image?

Can you share your docker config for the container?


RE: Library Scan Failing - adampdx - 2024-08-13

No, I don't think I'm restricting the container, at least not intentionally. I just ran a scan again, and I can watch the RAM usage fill the phyiscal RAM and the Jellyfin crashes and the memory clears out. I'm using the jellyfin/jellyfin image.

Do you want my compose file? Here it is.
https://pastebin.com/AMwc5Hd8


RE: Library Scan Failing - TheDreadPirate - 2024-08-13

Check if this environment variable is set.

Code:
sudo docker exec jellyfin env

Look for MALLOC_TRIM_THRESHOLD. If it isn't set, try adding this to the environment section.

Code:
- MALLOC_TRIM_THRESHOLD_=131072



RE: Library Scan Failing - adampdx - 2024-08-13

That resulted in the same behavior.


RE: Library Scan Failing - TheDreadPirate - 2024-08-13

Do you have any BDROMs in your library?