Jump to content

Emby crash System.OutOfMemoryException


Recommended Posts

Posted

Hi,

I recently update DSM to 7.2 and in addition, I updated emby server to the 7.2 build Version 4.7.13.0

The update took place on the 17th. Since then, emby crashed twice. First time I let it slide. Second time I looked into it.

This is the last lines in the log before the crash:

2023-08-20 16:42:07.000 Info Server: http/1.1 POST https://emby_remote_ip/emby/Sessions/Playing/Progress. UserAgent: Dalvik/2.1.0 (Linux; U; Android 9; MIBOX4 Build/PI)
2023-08-20 16:42:07.001 Info Server: http/1.1 Response 204 to host3. Time: 1ms. https://emby_remote_ip/emby/Sessions/Playing/Progress
2023-08-20 16:42:20.804 Error PlaybackReporting - EventMonitorEntryPoint: PlaybackMonitoringTask Exception
	*** Error Report ***
	Version: 4.7.13.0
	Command line: /volume1/@appstore/EmbyServer/system/EmbyServer.dll -programdata /var/packages/EmbyServer/var -ffdetect /var/packages/EmbyServer/target/bin/ffdetect -ffmpeg /var/packages/EmbyServer/target/bin/ffmpeg -ffprobe /var/packages/EmbyServer/target/bin/ffprobe -nolocalportconfig -ignore_vaapi_enabled_flag -pidfile /var/packages/EmbyServer/var/EmbyServer.pid -defaultdirectory /volume1/Public -updatepackage emby-server-synology72_{version}_x86_64.spk
	Operating system: Linux version 4.4.302+ (root@build5) (gcc version 12.2.0 (GCC) ) #64570 SMP Thu Jul 20 00:06:39 CST 2023
	Framework: .NET 6.0.14
	OS/Process: x64/x64
	Runtime: volume1/@appstore/EmbyServer/system/System.Private.CoreLib.dll
	Processor count: 8
	Data path: /var/packages/EmbyServer/var
	Application path: /volume1/@appstore/EmbyServer/system
	System.OutOfMemoryException: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
	   at SQLitePCL.pretty.DatabaseConnection.RollbackTransaction(IDatabaseConnection This)
	   at SQLitePCL.pretty.DatabaseConnection.RunInTransaction[T](IDatabaseConnection This, Func`2 f, TransactionMode mode)
	   at SQLitePCL.pretty.DatabaseConnection.RunInTransaction(IDatabaseConnection This, Action`1 action, TransactionMode mode)
	   at playback_reporting.Data.ActivityRepository.UpdatePlaybackAction(PlaybackInfo play_info)
	   at playback_reporting.EventMonitorEntryPoint.ProcessSessions()
	   at playback_reporting.EventMonitorEntryPoint.PlaybackMonitoringTask()
	Source: SQLitePCL.pretty
	TargetSite: Void RollbackTransaction(SQLitePCL.pretty.IDatabaseConnection)
	
2023-08-20 16:42:20.804 Info PlaybackReporting - EventMonitorEntryPoint: PlaybackMonitoringTask New Thread Sleep : 30

 

While looking through the log file, I see this recurring exception: (not really sure how to approach this one)

2023-08-20 11:27:14.253 Error App: Error getting files from /var/packages/EmbyServer/var/data/collections
	*** Error Report ***
	Version: 4.7.13.0
	Command line: /volume1/@appstore/EmbyServer/system/EmbyServer.dll -programdata /var/packages/EmbyServer/var -ffdetect /var/packages/EmbyServer/target/bin/ffdetect -ffmpeg /var/packages/EmbyServer/target/bin/ffmpeg -ffprobe /var/packages/EmbyServer/target/bin/ffprobe -nolocalportconfig -ignore_vaapi_enabled_flag -pidfile /var/packages/EmbyServer/var/EmbyServer.pid -defaultdirectory /volume1/Public -updatepackage emby-server-synology72_{version}_x86_64.spk
	Operating system: Linux version 4.4.302+ (root@build5) (gcc version 12.2.0 (GCC) ) #64570 SMP Thu Jul 20 00:06:39 CST 2023
	Framework: .NET 6.0.14
	OS/Process: x64/x64
	Runtime: volume1/@appstore/EmbyServer/system/System.Private.CoreLib.dll
	Processor count: 8
	Data path: /var/packages/EmbyServer/var
	Application path: /volume1/@appstore/EmbyServer/system
	System.IO.DirectoryNotFoundException: System.IO.DirectoryNotFoundException: Could not find a part of the path '/var/packages/EmbyServer/var/data/collections'.
	   at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
	   at System.IO.Enumeration.FileSystemEnumerator`1.Init()
	   at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
	   at System.IO.Enumeration.FileSystemEnumerableFactory.FileSystemInfos(String directory, String expression, EnumerationOptions options, Boolean isNormalized)
	   at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
	   at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileSystemEntries(String path, Boolean recursive)
	   at MediaBrowser.Controller.Providers.DirectoryService.GetFileSystemEntries(String path, Boolean clearCache)
	   at MediaBrowser.LocalMetadata.Images.LocalImageProvider.GetFiles(String[] paths, Boolean throwOnException, IDirectoryService directoryService)
	Source: System.Private.CoreLib
	TargetSite: IntPtr CreateDirectoryHandle(System.String, Boolean)

 

 

When the server crashed, the system was at 47% (out of 32GB) and the storage has a few TBs free.

Before the crash, there we a remote user watching trans coded media.

Looking at the system memory around that time you can see the memory increase over the viewing session and then crashing:

image.thumb.png.b8834c08149c3c6f8444162128192005.png

The red line is the start of the viewing session and you can see where the service crashed at 47% ( that's about 1.9GB increase in memory usage).

After the crash,  the system is at 38%( About 2.9GB freed up).

 

Any idea what I can do about this?

 

Thanks for reading :)

Posted

Its been quite a while since i last posted a question here.

Is there a new format for posting technical questions that I missed?
 

Posted

Hi, please attach the complete Emby server log from when the problem occurred.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...