Jellyfin Forum
Excessive RAM consumption - 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: Excessive RAM consumption (/t-excessive-ram-consumption)

Pages: 1 2 3 4 5 6 7 8 9


RE: Excessive RAM consumption - thymon - 2025-01-27

(2025-01-27, 06:41 PM)TheDreadPirate Wrote: I threw everything I could at my unRAID test instance.  I couldn't get it to use more than ~2.5GB of memory.  I didn't make any additional config changes.  Just default Docker settings in unRAID 7.

For me, it's never less than 2GB
Currently (10 streams in progress):
[Image: image.png]

EDIT :
At the time of writing this post, all CPUs went to 100% usage and Jellyfin was unusable.
I had to reboot docker.

With this message flooding the logs:
Code:
L POST /Sessions/Playing/Progress.
[20:33:41] [ERR] [228] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: Unexpected end of request content. URL POST /Sessions/Playing/Progress.
[20:33:42] [ERR] [202] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: Unexpected end of request content. URL POST /Sessions/Playing/Progress.
[20:33:49] [ERR] [232] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: Unexpected end of request content. URL POST /Sessions/Playing/Progress.
[20:33:49] [ERR] [232] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: Unexpected end of request content. URL POST /Sessions/Playing/Progress.
[20:33:56] [ERR] [241] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: Unexpected end of request content. URL POST /Sessions/Playing/Progress.
[20:33:58] [ERR] [244] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: Unexpected end of request content. URL POST /Sessions/Playing/Progress.
[20:34:06] [ERR] [143] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: Unexpected end of request content. URL POST /Sessions/Playing/Progress.
[20:34:13] [ERR] [69] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: Unexpected end of request content. URL POST /Sessions/Playing/Progress.
[20:34:15] [ERR] [265] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: Unexpected end of request content. URL POST /Sessions/Playing/Progress.



RE: Excessive RAM consumption - gnattu - 2025-01-27

Do you use JellyStat? If so can you disable JellyStat and see if that make things better?


RE: Excessive RAM consumption - thymon - 2025-01-27

(2025-01-27, 07:49 PM)gnattu Wrote: Do you use JellyStat? If so can you disable JellyStat and see if that make things better?

Yes I can test it Smiling-face
wait & see now :p


And 18,9GB RAM used...  Flushed-face

[Image: image.png]

Crash is coming...
[Image: image.png]


RE: Excessive RAM consumption - gnattu - 2025-01-28

Restart the container without JellyStat running. Stopping JellyStat in the middle won't release the memory already being used for some reason. You have to restart Jelyfin without JellyStat in the first place.


RE: Excessive RAM consumption - thymon - 2025-01-28

(2025-01-28, 02:22 AM)gnattu Wrote: Restart the container without JellyStat running. Stopping JellyStat in the middle won't release the memory already being used for some reason. You have to restart Jelyfin without JellyStat in the first place.

I still have a doubt. Because Jellystat is not a plugin. It's a standalone Docker container that only makes API calls.
I turned it off, so let's see Smiling-face


RE: Excessive RAM consumption - thymon - 2025-01-28

(2025-01-28, 02:22 AM)gnattu Wrote: Restart the container without JellyStat running. Stopping JellyStat in the middle won't release the memory already being used for some reason. You have to restart Jelyfin without JellyStat in the first place.

That wasn't it.
RAM usage slowly increases throughout the day. Here we are in the evening and docker is at 13.5GB of RAM usage right now.


RE: Excessive RAM consumption - thymon - 2025-01-30

I turned Jellystat back on because it wasn't the cause.

However, I think I've solved the problem. For the past 48 hours, my RAM usage hasn't exceeded 8.5GB, and more importantly, Jellyfin hasn't crashed due to various errors.

I mainly did two things:

1. Completely stopped Trickplay generation.
2. Added the advanced parameters in my NPM (https://jellyfin.org/docs/general/networking/nginx#nginx-proxy-manager).

Thanks for your patience and help!


RE: Excessive RAM consumption - TheDreadPirate - 2025-01-30

Another user in our Matrix chat had an unrelated problem that was also caused by Nginx Proxy Manager. Specifically, proxy_buffering. The default behavior is for that to be enabled. Our documentation for Nginx, in general, disables it.

I will give this a test this weekend.


RE: Excessive RAM consumption - thymon - 2025-01-30

Finally, it just went up to 100% CPU usage and reached 15GB of RAM.
I had to reboot it.

With this message in the logs:
It was a FireTV that kept connecting and disconnecting in a loop....


Code:
[2025-01-30 21:01:24.648 +01:00] [ERR] [482] Emby.Server.Implementations.Session.SessionManager: Error reporting playback progress
MediaBrowser.Common.Extensions.ResourceNotFoundException: Session bfa134d2b5f25722731b97ef8fb1614b not found.
  at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
  at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2025-01-30 21:01:25.649 +01:00] [ERR] [503] Emby.Server.Implementations.Session.SessionManager: Error reporting playback progress
MediaBrowser.Common.Extensions.ResourceNotFoundException: Session bfa134d2b5f25722731b97ef8fb1614b not found.
  at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
  at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2025-01-30 21:01:26.649 +01:00] [ERR] [504] Emby.Server.Implementations.Session.SessionManager: Error reporting playback progress
MediaBrowser.Common.Extensions.ResourceNotFoundException: Session bfa134d2b5f25722731b97ef8fb1614b not found.
  at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
  at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2025-01-30 21:01:27.648 +01:00] [ERR] [482] Emby.Server.Implementations.Session.SessionManager: Error reporting playback progress
MediaBrowser.Common.Extensions.ResourceNotFoundException: Session bfa134d2b5f25722731b97ef8fb1614b not found.
  at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
  at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2025-01-30 21:01:28.649 +01:00] [ERR] [484] Emby.Server.Implementations.Session.SessionManager: Error reporting playback progress
MediaBrowser.Common.Extensions.ResourceNotFoundException: Session bfa134d2b5f25722731b97ef8fb1614b not found.
  at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
  at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2025-01-30 21:01:29.649 +01:00] [ERR] [484] Emby.Server.Implementations.Session.SessionManager: Error reporting playback progress
MediaBrowser.Common.Extensions.ResourceNotFoundException: Session bfa134d2b5f25722731b97ef8fb1614b not found.
  at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
  at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2025-01-30 21:01:30.649 +01:00] [ERR] [517] Emby.Server.Implementations.Session.SessionManager: Error reporting playback progress
MediaBrowser.Common.Extensions.ResourceNotFoundException: Session bfa134d2b5f25722731b97ef8fb1614b not found.
  at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
  at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2025-01-30 21:01:31.685 +01:00] [ERR] [496] Emby.Server.Implementations.Session.SessionManager: Error reporting playback progress
MediaBrowser.Common.Extensions.ResourceNotFoundException: Session bfa134d2b5f25722731b97ef8fb1614b not found.
  at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
  at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2025-01-30 21:01:32.766 +01:00] [ERR] [38] Emby.Server.Implementations.Session.SessionManager: Error reporting playback progress
MediaBrowser.Common.Extensions.ResourceNotFoundException: Session bfa134d2b5f25722731b97ef8fb1614b not found.
  at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
  at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2025-01-30 21:01:33.650 +01:00] [ERR] [482] Emby.Server.Implementations.Session.SessionManager: Error reporting playback progress
MediaBrowser.Common.Extensions.ResourceNotFoundException: Session bfa134d2b5f25722731b97ef8fb1614b not found.
  at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
  at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2025-01-30 21:01:34.652 +01:00] [ERR] [482] Emby.Server.Implementations.Session.SessionManager: Error reporting playback progress
MediaBrowser.Common.Extensions.ResourceNotFoundException: Session bfa134d2b5f25722731b97ef8fb1614b not found.
  at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
  at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2025-01-30 21:01:35.711 +01:00] [ERR] [496] Emby.Server.Implementations.Session.SessionManager: Error reporting playback progress
MediaBrowser.Common.Extensions.ResourceNotFoundException: Session bfa134d2b5f25722731b97ef8fb1614b not found.
  at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
  at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2025-01-30 21:01:36.648 +01:00] [ERR] [48] Emby.Server.Implementations.Session.SessionManager: Error reporting playback progress
MediaBrowser.Common.Extensions.ResourceNotFoundException: Session bfa134d2b5f25722731b97ef8fb1614b not found.
  at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
  at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2025-01-30 21:01:37.649 +01:00] [ERR] [484] Emby.Server.Implementations.Session.SessionManager: Error reporting playback progress
MediaBrowser.Common.Extensions.ResourceNotFoundException: Session bfa134d2b5f25722731b97ef8fb1614b not found.
  at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
  at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2025-01-30 21:01:38.649 +01:00] [ERR] [68] Emby.Server.Implementations.Session.SessionManager: Error reporting playback progress
MediaBrowser.Common.Extensions.ResourceNotFoundException: Session bfa134d2b5f25722731b97ef8fb1614b not found.
  at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
  at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2025-01-30 21:01:39.164 +01:00] [INF] [484] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "102.35.20.104" request
[2025-01-30 21:01:39.649 +01:00] [ERR] [519] Emby.Server.Implementations.Session.SessionManager: Error reporting playback progress
MediaBrowser.Common.Extensions.ResourceNotFoundException: Session bfa134d2b5f25722731b97ef8fb1614b not found.
  at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
  at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2025-01-30 21:01:40.648 +01:00] [ERR] [471] Emby.Server.Implementations.Session.SessionManager: Error reporting playback progress
MediaBrowser.Common.Extensions.ResourceNotFoundException: Session bfa134d2b5f25722731b97ef8fb1614b not found.
  at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
  at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2025-01-30 21:01:41.652 +01:00] [ERR] [471] Emby.Server.Implementations.Session.SessionManager: Error reporting playback progress
MediaBrowser.Common.Extensions.ResourceNotFoundException: Session bfa134d2b5f25722731b97ef8fb1614b not found.
  at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
  at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2025-01-30 21:01:42.652 +01:00] [ERR] [487] Emby.Server.Implementations.Session.SessionManager: Error reporting playback progress
MediaBrowser.Common.Extensions.ResourceNotFoundException: Session bfa134d2b5f25722731b97ef8fb1614b not found.
  at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)

There seems to be a bug in session management, doesn't it?


RE: Excessive RAM consumption - thymon - 2025-03-16

I'm sorry to bring up this topic again, but I still haven't found a way to fix this memory leak issue.
For now, I'm rebooting the Jellyfin Docker container every night to free up RAM.
Last night, for example, there was a lot of activity, and my server crashed because Jellyfin reached 23GB of RAM usage.

What tests could I run to help diagnose this issue ?