Jump to content

Thumbnail image extraction Failed


Saentis

Recommended Posts

Every few days, I get an error like this. While seemingly insignificant, my media folder is no longer scanned. Resolves upon restarting computer (problem persists with Emby Server restart)

Quote

Thumbnail image extraction Failed on ______

Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown. at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc) at SQLitePCL.pretty.StatementImpl.MoveNext() at Emby.Server.Implementations.Data.SqliteItemRepository.SetItemExtradata(IDatabaseConnection db, Int64 itemId, Int64 extradataTypeId, String value) at Emby.Server.Implementations.Data.SqliteItemRepository.LogThumbnailImageExtractionFailure(Int64 itemId, Int64 dateModifiedUnixTimeSeconds) at Emby.Providers.MediaInfo.ChapterImagesTask.Execute(CancellationToken cancellationToken, IProgress`1 progress) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)

Currently running Emby Server 4.7.14.0 for MacOS. Has existed for several versions. Running on a 2022 M1 Max Mac Studio dedicated to Emby Server. Mac OS 13.1. 

Media on Synology NAS.

I found this in the log file around the time of the error:

Quote

2023-11-09 02:00:00.078 Info App: ProcessRun 'quick-extract-imageseries' Execute: /Applications/EmbyServer.app/Contents/MacOS/ffmpeg -f matroska -threads 1 -skip_interval 10 -copyts -i file:"/Volumes/EmbyMovie/Movies/x.mkv" -an -sn -vf "scale=w=320:h=134,format=yuv420p,eq=contrast=0.9:gamma=0.95:saturation=1.8" -vsync cfr -r 0.1 -f image2 "/Users/pilatus/.config/emby-server/cache/temp/aad0d4ad96954714993fa0beadcc57cd/img_%05d.jpg"
2023-11-09 02:06:31.842 Info App: ProcessRun 'quick-extract-imageseries' Process exited with code 0 - Succeeded
2023-11-09 02:06:33.046 Error ChapterImagesTask: Error refreshing thumbnails for /Volumes/EmbyMovie/Movies/x.mkv
    *** Error Report ***
    Version: 4.7.14.0
    Command line: /Applications/EmbyServer.app/Contents/MacOS/EmbyServer.dll
    Operating system: Darwin 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:03:51 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T6000
    Framework: .NET 6.0.21
    OS/Process: arm64/arm64
    Runtime: Applications/EmbyServer.app/Contents/MacOS/System.Private.CoreLib.dll
    Processor count: 10
    Data path: /Users/pilatus/.config/emby-server
    Application path: /Applications/EmbyServer.app/Contents/MacOS
    SQLitePCL.pretty.SQLiteException: Busy: database is locked
    SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
       at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
       at SQLitePCL.pretty.StatementImpl.MoveNext()
       at Emby.Server.Implementations.Data.SqliteItemRepository.ClearItemExtradata(IDatabaseConnection db, Int64 itemId, Int64 extradataTypeId)
       at Emby.Server.Implementations.Data.SqliteItemRepository.SaveChapters(Int64 itemId, Boolean clearExtractionFailureResult, List`1 chapters)
       at Emby.Providers.MediaInfo.ThumbnailGenerator.RefreshThumbnailImages(Video item, MediaStream videoStream, LibraryOptions libraryOptions, IDirectoryService directoryService, List`1 chapters, Boolean extractImages, Boolean saveChapters, CancellationToken cancellationToken)
       at Emby.Providers.MediaInfo.ChapterImagesTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
    Source: SQLitePCL.pretty
    TargetSite: Void CheckOk(SQLitePCLEx.sqlite3, Int32)
    
2023-11-09 02:06:33.046 Error TaskManager: Error
    *** Error Report ***
    Version: 4.7.14.0
    Command line: /Applications/EmbyServer.app/Contents/MacOS/EmbyServer.dll
    Operating system: Darwin 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:03:51 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T6000
    Framework: .NET 6.0.21
    OS/Process: arm64/arm64
    Runtime: Applications/EmbyServer.app/Contents/MacOS/System.Private.CoreLib.dll
    Processor count: 10
    Data path: /Users/pilatus/.config/emby-server
    Application path: /Applications/EmbyServer.app/Contents/MacOS
    SQLitePCL.pretty.SQLiteException: Busy: database is locked
    SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
       at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
       at SQLitePCL.pretty.StatementImpl.MoveNext()
       at Emby.Server.Implementations.Data.SqliteItemRepository.SetItemExtradata(IDatabaseConnection db, Int64 itemId, Int64 extradataTypeId, String value)
       at Emby.Server.Implementations.Data.SqliteItemRepository.LogThumbnailImageExtractionFailure(Int64 itemId, Int64 dateModifiedUnixTimeSeconds)
       at Emby.Providers.MediaInfo.ChapterImagesTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
       at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
    Source: SQLitePCL.pretty
    TargetSite: Void CheckOk(SQLitePCLEx.sqlite3, Int32)

And these errors for every scanned media thereafter:

Quote

2023-11-09 02:27:07.565 Error ProviderManager: Error refreshing item x2 2e81a939-45c8-3dc8-42ae-29b1054515d0 /Volumes/EmbyMovie/Movies/x2.mkv
    *** Error Report ***
    Version: 4.7.14.0
    Command line: /Applications/EmbyServer.app/Contents/MacOS/EmbyServer.dll
    Operating system: Darwin 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:03:51 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T6000
    Framework: .NET 6.0.21
    OS/Process: arm64/arm64
    Runtime: Applications/EmbyServer.app/Contents/MacOS/System.Private.CoreLib.dll
    Processor count: 10
    Data path: /Users/pilatus/.config/emby-server
    Application path: /Applications/EmbyServer.app/Contents/MacOS
    SQLitePCL.pretty.SQLiteException: Busy: database is locked
    SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
       at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
       at SQLitePCL.pretty.StatementImpl.MoveNext()
       at Emby.Server.Implementations.Data.SqliteItemRepository.UpdatePeople(Int64 itemId, Int64 topParentId, List`1 people)
       at Emby.Providers.Manager.MetadataService`2.SaveItem(MetadataResult`1 result, Boolean isFirstRefresh, LibraryOptions libraryOptions, ItemUpdateType reason, IDirectoryService directoryService, MetadataRefreshOptions metadataRefreshOptions, CancellationToken cancellationToken)
       at Emby.Providers.Manager.MetadataService`2.RefreshMetadata(BaseItem item, MetadataRefreshOptions refreshOptions, LibraryOptions libraryOptions, CancellationToken cancellationToken)
       at MediaBrowser.Controller.Entities.BaseItem.RefreshMetadata(MetadataRefreshOptions options, LibraryOptions libraryOptions, CancellationToken cancellationToken)
       at Emby.Providers.Manager.ProviderManager.RefreshItem(BaseItem item, MetadataRefreshOptions options, CancellationToken cancellationToken)
       at Emby.Providers.Manager.ProviderManager.StartProcessingRefreshQueue()
    Source: SQLitePCL.pretty
    TargetSite: Void CheckOk(SQLitePCLEx.sqlite3, Int32)

 

Link to comment
Share on other sites

No, only the one. 

 

Not sure if it's relevant, but:

- I do have a persistence script that will restart Emby if it crashes. I'm not sure how often it's being used though, or if after restarting Emby, there are two instances causing the error?

- A few days ago I had to restore from a backup after I saw a "Welcome to Emby" message. Had to re-link all the users' Emby Connect accounts. 

 

I came across this post: 

Mine also says database is locked. Wondering if it may be a network mount issue? Compared to when I used a QNAP NAS, I now have to manually scan for media files with the Synology NAS.

Link to comment
Share on other sites

Quote

No, only the one. 

Hi, how did you confirm this?

Quote

or if after restarting Emby, there are two instances causing the error?

It's possible. Perhaps try taking that script out of the equation?

Quote

Wondering if it may be a network mount issue?

The database file is on the server machine though, right?

Link to comment
Share on other sites

5 hours ago, Luke said:

Hi, how did you confirm this?

In general, I only run one Emby server. When I checked Activity Monitor, it was only listed once. Of course, this was after restarting, which fixes the problem. I'll check Activity Monitor the next time it occurs

5 hours ago, Luke said:

It's possible. Perhaps try taking that script out of the equation?

I'll keep it on until it happens again to check the Activity Monitor. Then I'll try removing it.

5 hours ago, Luke said:

The database file is on the server machine though, right?

Correct

Link to comment
Share on other sites

Quote

I'll keep it on until it happens again to check the Activity Monitor. Then I'll try removing it.

OK that would be great, thanks.

Link to comment
Share on other sites

Okay, the error happened again on Nov 17th.

Quote

Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown. at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc) at SQLitePCL.pretty.StatementImpl.MoveNext() at Emby.Server.Implementations.Data.SqliteItemRepository.SetItemExtradata(IDatabaseConnection db, Int64 itemId, Int64 extradataTypeId, String value) at Emby.Server.Implementations.Data.SqliteItemRepository.LogThumbnailImageExtractionFailure(Int64 itemId, Int64 dateModifiedUnixTimeSeconds) at Emby.Providers.MediaInfo.ChapterImagesTask.Execute(CancellationToken cancellationToken, IProgress`1 progress) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)

Always happens during the 2AM thumbnail image extraction. 

I can verify that there are indeed two instances of Emby Server running, so it could be that the persistence script is causing it. 

on run
	doit()
end run

on idle
	doit()
	return 120 -- in seconds
end idle

on doit()
	tell application "System Events"
		set EmbyApps to every application process whose bundle identifier is "com.embyapp.embymediaserver"
		if (count of EmbyApps) is 0 then
			tell application "Finder"
				launch application "EmbyServer"
			end tell
		end if
	end tell
end doit

I will now disable the persistence script to see if it happens again. However, that leads to the question, what is causing Emby Server to quit every few days?

 

I went through the log file created before 2AM, and it had a lot of these errors:

Quote

2023-11-17 00:31:48.471 Error App: Error getting files from /Volumes/home/Plex/Documentaries
    *** Error Report ***
    Version: 4.7.14.0
    Command line: /Applications/EmbyServer.app/Contents/MacOS/EmbyServer.dll
    Operating system: Darwin 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:03:51 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T6000
    Framework: .NET 6.0.21
    OS/Process: arm64/arm64
    Runtime: Applications/EmbyServer.app/Contents/MacOS/System.Private.CoreLib.dll
    Processor count: 10
    Data path: /Users/pilatus/.config/emby-server
    Application path: /Applications/EmbyServer.app/Contents/MacOS
    System.IO.DirectoryNotFoundException: System.IO.DirectoryNotFoundException: Could not find a part of the path '/Volumes/home/Plex/Documentaries'.
       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)

 

Link to comment
Share on other sites

  • 2 weeks later...

@Saentislooks like you're getting plugin updates:

2023-11-17 01:25:47.115 Info App: Automatically restarting the system because it is idle and a restart is required.

The server is trying to restart itself but for whatever reason isn't coming back up.

So that's the good news, there's no crash. In server settings you can disable the option to automatically restart for plugin updates, and then you can just restart the server occasionally manually when it tells you that it's needed.

Link to comment
Share on other sites

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...