Jellyfin Forum
Problem with CPU at 100% and RAM does not stop increasing - 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: Problem with CPU at 100% and RAM does not stop increasing (/t-problem-with-cpu-at-100-and-ram-does-not-stop-increasing--7572)

Pages: 1 2 3


Problem with CPU at 100% and RAM does not stop increasing - franciscok - 2024-08-20

Hello, I have a problem with my server, it was working fine and suddenly once a day or every two days the CPU goes to 100% and Jellyfin stops working and to fix it I have to restart the server.

Another problem is that the RAM keeps increasing, when I restart it restarts but it never stops increasing, it increases slowly but it doesn't stop.

I don't know if it can all come from the same thing or not but since the last update of Jellyfin the ram has never reached more than 30 but also because the CPU has reached 100% and I had to restart the server before, I leave you an image of the server with the CPU at 100% and with enough RAM.

   

I use Ubuntu 20.04 and the latest version of Jellyfin.

PD: Sorry if something is not understood nullbut I don't know English and I'm using the translator, thank you very much


RE: Problem with CPU at 100% and RAM does not stop increasing - TheDreadPirate - 2024-08-21

Can you post your full jellyfin log via pastebin? The logs are found in /var/log/jellyfin and the file name starts with "log".

But this looks like you've recently added a lot of new content and it is scanning them into your library. You can try limiting the number of threads a library scan can spawn. Go to Dashboard > General, and set "Parallel library scan tasks limit" and "Parallel image encoding limit" to a non-zero number. Maybe 10? The default behavior is 2x your CPU threads, which would be 80. And that would definitely use a ton of memory.


RE: Problem with CPU at 100% and RAM does not stop increasing - franciscok - 2024-08-21

Pastebin tells me it is under maintenance, I will try later or tell me another place and I will try to upload the log.

the library is scanned all and when this happens it is not when it is scanning since I have set specific hours and it takes little time to read the new content of each day

what numbers do I put in "Parallel library scan task limit" and "Parallel image encoding limit?
Parallel library scan task limit = 10
Parallel image encoding limit = 80
Is that right?


RE: Problem with CPU at 100% and RAM does not stop increasing - TheDreadPirate - 2024-08-21

Set both to 10.


RE: Problem with CPU at 100% and RAM does not stop increasing - franciscok - 2024-08-21

ok, I've already set it to 10 both

I put 15 in playback where it says Cores to use during conversion because I didn't know if that was the reason for the error but it still gave the error. Do you recommend setting it to maximum, which is how it was?

and further down it appears to check this box:
Do not allow any
Delete old segments after the client has downloaded them. This avoids having to store the entire transcoded file on disk. Disable it if you have playback problems.
I checked it to try too, do I leave it like that or uncheck it?


RE: Problem with CPU at 100% and RAM does not stop increasing - TheDreadPirate - 2024-08-21

What are your server hardware specs? Do you have a GPU? 8 cores should be plenty. Adding more than 8-12 threads doesn't really improve transcoding performance.

And this is the first time you mentioned an error.

I have "Delete segments" checked and you should keep it checked.

Try posting your logs to https://www.toptal.com/developers/hastebin


RE: Problem with CPU at 100% and RAM does not stop increasing - franciscok - 2024-08-21

The error has been happening to me all the time, before it lasted 3 or 4 days but now it happens every day or two.

The server specifications are 40 CPU, 128 RAM and 10 Gbps, I'll leave you an image of more specifications in case it's necessary

   

And which log do you need, the one before the error, or the one after the error?
I've seen that they are separated, and you need the whole log or part of it because I've tried to paste the whole log on that website and it gets stuck and I imagine that's because the log is very long.


RE: Problem with CPU at 100% and RAM does not stop increasing - TheDreadPirate - 2024-08-21

I need the whole log since I don't know specifically what I am looking for.

If pastebin sites say its too big, you can zip the file and attach the zip file to a forum post. You need to click "Preview Post" or "New Reply" to get the full reply editor where you can attach files.


RE: Problem with CPU at 100% and RAM does not stop increasing - franciscok - 2024-08-21

Ok, here you have the 2 logs, the error was around 20:35 hours


RE: Problem with CPU at 100% and RAM does not stop increasing - TheDreadPirate - 2024-08-21

Looking over your logs, the only problem I see are the errors about tracking playback progress. But that doesn't seem to prevent users from watching videos, as far as I can tell. Other than that, the high CPU usage is from remuxing and audio transcoding for the huge number of users you have.

You have 20 cores and 40 threads, but they're pretty old Intel cores. You've disabled video transcoding, so that isn't an issue. You've limited the number of library scan threads now. The issue is just the number of users you have.