Intermittent 'database is locked', webui/jellyfin becomes unresponsive #6819

Closed
opened 2026-02-07 04:09:00 +03:00 by OVERLORD · 29 comments
Owner

Originally created by @SLemons13 on GitHub (Mar 11, 2025).

Description of the bug

Intermittent 'database is locked' errors despite following all troubleshooting steps found on github issues/forums. Very similar behavior to issue #12312, though it does not seem to be caused by library scans. I see an error about the database being locked in the logs, the web ui becomes unresponsive, and memory usage will begin to balloon until the container is stopped. Has been happening for that last couple months, I can't find a correlation to any particular task/action which causes it. Have been dealing with this from version 10.10.3-10.10.6

Reproduction steps

  1. Start Jellyfin
  2. Wait. It has happened 5 minutes after starting the server, or up to 4 days later

What is the current bug behavior?

I see an error about the database being locked in the logs, the web ui becomes unresponsive, and memory usage will begin to balloon until the container is stopped.

What is the expected correct behavior?

No stability issues

Jellyfin Server version

10.10.0+

Specify commit id

No response

Specify unstable release number

No response

Specify version number

No response

Specify the build version

10.10.6

Environment

- OS: TrueNAS SCALE 24.10.2
- Linux Kernel: 6.6.44
- Virtualization: Docker (jellyfin/jellyfin image)
- Clients: All
- Browser: Firefox 136
- FFmpeg Version: 7.0.2
- Playback Method: All
- Hardware Acceleration: QSV
- GPU Model: Arc A770
- Plugins: Fanart, InfuseDB, Intro Skipper, Open Subtitles, Playback Reporting, Reports, TMDb box sets
- Reverse Proxy: Nginx
- Base URL: none
- Networking: Bridge
- Storage: local

Jellyfin logs

Log from when it happened immediately after starting JF:

[2025-03-10 02:43:09.007 -07:00] [INF] [1] Main: Jellyfin version: "10.10.6"
[2025-03-10 02:43:09.030 -07:00] [INF] [1] Main: Environment Variables: ["[JELLYFIN_DATA_DIR, /config]", "[JELLYFIN_CACHE_DIR, /cache]", "[JELLYFIN_LOG_DIR, /config/log]", "[JELLYFIN_FFMPEG, /usr/lib/jellyfin-ffmpeg/ffmpeg]", "[JELLYFIN_WEB_DIR, /jellyfin/jellyfin-web]", "[JELLYFIN_SQLITE__disableSecondLevelCache, false]", "[JELLYFIN_PublishedServerUrl, https://jellyfin.redacted]", "[JELLYFIN_CONFIG_DIR, /config/config]"]
[2025-03-10 02:43:09.031 -07:00] [INF] [1] Main: Arguments: ["/jellyfin/jellyfin.dll"]
[2025-03-10 02:43:09.032 -07:00] [INF] [1] Main: Operating system: "Debian GNU/Linux 12 (bookworm)"
[2025-03-10 02:43:09.032 -07:00] [INF] [1] Main: Architecture: X64
[2025-03-10 02:43:09.032 -07:00] [INF] [1] Main: 64-Bit Process: True
[2025-03-10 02:43:09.032 -07:00] [INF] [1] Main: User Interactive: True
[2025-03-10 02:43:09.032 -07:00] [INF] [1] Main: Processor count: 6
[2025-03-10 02:43:09.032 -07:00] [INF] [1] Main: Program data path: "/config"
[2025-03-10 02:43:09.032 -07:00] [INF] [1] Main: Log directory path: "/config/log"
[2025-03-10 02:43:09.032 -07:00] [INF] [1] Main: Config directory path: "/config/config"
[2025-03-10 02:43:09.032 -07:00] [INF] [1] Main: Cache path: "/cache"
[2025-03-10 02:43:09.033 -07:00] [INF] [1] Main: Temp directory path: "/tmp/jellyfin"
[2025-03-10 02:43:09.033 -07:00] [INF] [1] Main: Web resources path: "/jellyfin/jellyfin-web"
[2025-03-10 02:43:09.033 -07:00] [INF] [1] Main: Application directory: "/jellyfin/"
[2025-03-10 02:43:09.146 -07:00] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: "/config/cache"
[2025-03-10 02:43:09.266 -07:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies
[2025-03-10 02:43:09.310 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Skipping disabled plugin "3.0.0.0" of "Chapter Segments Provider" 
[2025-03-10 02:43:09.313 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.Fanart, Version=12.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Fanart_12.0.0.0/Jellyfin.Plugin.Fanart.dll"
[2025-03-10 02:43:09.315 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "InfuseSync, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/InfuseSync_1.5.0.0/InfuseSync.dll"
[2025-03-10 02:43:09.318 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "IntroSkipper, Version=1.10.10.15, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Intro Skipper_1.10.10.15/IntroSkipper.dll"
[2025-03-10 02:43:09.320 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.OpenSubtitles, Version=20.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Open Subtitles_20.0.0.0/Jellyfin.Plugin.OpenSubtitles.dll"
[2025-03-10 02:43:09.322 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "SQLitePCL.pretty, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Playback Reporting_15.0.0.0/SQLitePCL.pretty.dll"
[2025-03-10 02:43:09.322 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.PlaybackReporting, Version=15.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Playback Reporting_15.0.0.0/Jellyfin.Plugin.PlaybackReporting.dll"
[2025-03-10 02:43:09.334 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13" from "/config/plugins/Reports_17.0.0.0/SixLabors.Fonts.dll"
[2025-03-10 02:43:09.335 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "System.IO.Packaging, Version=4.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from "/config/plugins/Reports_17.0.0.0/System.IO.Packaging.dll"
[2025-03-10 02:43:09.353 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "ClosedXML, Version=0.97.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b" from "/config/plugins/Reports_17.0.0.0/ClosedXML.dll"
[2025-03-10 02:43:09.446 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "DocumentFormat.OpenXml, Version=2.16.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17" from "/config/plugins/Reports_17.0.0.0/DocumentFormat.OpenXml.dll"
[2025-03-10 02:43:09.450 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.Reports, Version=17.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Reports_17.0.0.0/Jellyfin.Plugin.Reports.dll"
[2025-03-10 02:43:09.450 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "ExcelNumberFormat, Version=1.1.0.0, Culture=neutral, PublicKeyToken=23c6f5d73be07eca" from "/config/plugins/Reports_17.0.0.0/ExcelNumberFormat.dll"
[2025-03-10 02:43:09.450 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.SkinManager, Version=2.0.2.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Skin Manager_2.0.2.0/Jellyfin.Plugin.SkinManager.dll"
[2025-03-10 02:43:09.451 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.TMDbBoxSets, Version=11.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/TMDb Box Sets_11.0.0.0/Jellyfin.Plugin.TMDbBoxSets.dll"
[2025-03-10 02:43:09.451 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Skipping disabled plugin "1.3.4.0" of "TubeArchivist Metadata" 
[2025-03-10 02:43:09.511 -07:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]
[2025-03-10 02:43:09.511 -07:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN exclusions: []
[2025-03-10 02:43:09.511 -07:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Used LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]
[2025-03-10 02:43:09.512 -07:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Filtered interface addresses: ["127.0.0.1", "172.16.3.2"]
[2025-03-10 02:43:09.513 -07:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Bind Addresses ["0.0.0.0"]
[2025-03-10 02:43:09.513 -07:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Remote IP filter is "Allowlist"
[2025-03-10 02:43:09.513 -07:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Filtered subnets: []
[2025-03-10 02:43:28.177 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Fanart" "12.0.0.0"
[2025-03-10 02:43:28.178 -07:00] [INF] [1] InfuseSync.Plugin: InfuseSync is starting.
[2025-03-10 02:43:28.187 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "InfuseSync" "1.5.0.0"
[2025-03-10 02:43:28.467 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Intro Skipper" "1.10.10.15"
[2025-03-10 02:43:28.474 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Open Subtitles" "20.0.0.0"
[2025-03-10 02:43:28.475 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Playback Reporting" "15.0.0.0"
[2025-03-10 02:43:28.476 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Reports" "17.0.0.0"
[2025-03-10 02:43:28.477 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "SkinManager" "2.0.2.0"
[2025-03-10 02:43:28.478 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "TMDb Box Sets" "11.0.0.0"
[2025-03-10 02:43:28.478 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "TMDb" "10.10.6.0"
[2025-03-10 02:43:28.479 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Studio Images" "10.10.6.0"
[2025-03-10 02:43:28.479 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "OMDb" "10.10.6.0"
[2025-03-10 02:43:28.489 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "MusicBrainz" "10.10.6.0"
[2025-03-10 02:43:28.489 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "AudioDB" "10.10.6.0"
[2025-03-10 02:43:28.599 -07:00] [WRN] [1] Microsoft.AspNetCore.DataProtection.Repositories.EphemeralXmlRepository: Using an in-memory repository. Keys will not be persisted to storage.
[2025-03-10 02:43:28.599 -07:00] [WRN] [1] Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager: Neither user profile nor HKLM registry available. Using an ephemeral key repository. Protected data will be unavailable when application exits.
[2025-03-10 02:43:28.606 -07:00] [INF] [1] Main: Kestrel is listening on "0.0.0.0"
[2025-03-10 02:43:28.618 -07:00] [INF] [1] IntroSkipper.Services.Entrypoint: Running startup enqueue
[2025-03-10 02:43:28.790 -07:00] [INF] [1] IntroSkipper.Manager.QueueManager: Running enqueue of items in library "Anime Shows"
[2025-03-10 02:43:29.514 -07:00] [INF] [1] IntroSkipper.Manager.QueueManager: Running enqueue of items in library "Shows"
[2025-03-10 02:43:32.019 -07:00] [INF] [1] IntroSkipper.Manager.QueueManager: Running enqueue of items in library "Recordings"
[2025-03-10 02:43:32.020 -07:00] [INF] [1] IntroSkipper.Manager.QueueManager: Running enqueue of items in library "Collections"
[2025-03-10 02:43:32.021 -07:00] [INF] [1] IntroSkipper.Manager.QueueManager: Running enqueue of items in library "Movies"
[2025-03-10 02:43:32.120 -07:00] [INF] [1] IntroSkipper.Manager.QueueManager: Running enqueue of items in library "Anime Movies"
[2025-03-10 02:43:32.128 -07:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: EventMonitorEntryPoint Running
[2025-03-10 02:43:32.137 -07:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: Sqlite version: 3.41.2
[2025-03-10 02:43:32.138 -07:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: Sqlite compiler options: ATOMIC_INTRINSICS=1,COMPILER=gcc-9.4.0,DEFAULT_AUTOVACUUM,DEFAULT_CACHE_SIZE=-2000,DEFAULT_FILE_FORMAT=4,DEFAULT_FOREIGN_KEYS,DEFAULT_JOURNAL_SIZE_LIMIT=-1,DEFAULT_MMAP_SIZE=0,DEFAULT_PAGE_SIZE=4096,DEFAULT_PCACHE_INITSZ=20,DEFAULT_RECURSIVE_TRIGGERS,DEFAULT_SECTOR_SIZE=4096,DEFAULT_SYNCHRONOUS=2,DEFAULT_WAL_AUTOCHECKPOINT=1000,DEFAULT_WAL_SYNCHRONOUS=2,DEFAULT_WORKER_THREADS=0,ENABLE_COLUMN_METADATA,ENABLE_FTS3,ENABLE_FTS3_PARENTHESIS,ENABLE_FTS4,ENABLE_FTS5,ENABLE_MATH_FUNCTIONS,ENABLE_RTREE,ENABLE_SNAPSHOT,MALLOC_SOFT_LIMIT=1024,MAX_ATTACHED=10,MAX_COLUMN=2000,MAX_COMPOUND_SELECT=500,MAX_DEFAULT_PAGE_SIZE=8192,MAX_EXPR_DEPTH=1000,MAX_FUNCTION_ARG=127,MAX_LENGTH=1000000000,MAX_LIKE_PATTERN_LENGTH=50000,MAX_MMAP_SIZE=0x7fff0000,MAX_PAGE_COUNT=1073741823,MAX_PAGE_SIZE=65536,MAX_SQL_LENGTH=1000000000,MAX_TRIGGER_DEPTH=1000,MAX_VARIABLE_NUMBER=32766,MAX_VDBE_OP=250000000,MAX_WORKER_THREADS=8,MUTEX_PTHREADS,SYSTEM_MALLOC,TEMP_STORE=1,THREADSAFE=1
[2025-03-10 02:43:32.149 -07:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: Default journal_mode for "/config/data/playback_reporting.db" is "delete"
[2025-03-10 02:43:32.150 -07:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: Initialize PlaybackActivity Repository
[2025-03-10 02:43:32.151 -07:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: PlaybackActivity table schema OK
[2025-03-10 02:43:32.151 -07:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: Expected : "datecreated:datetime|userid:text|itemid:text|itemtype:text|itemname:text|playbackmethod:text|clientname:text|devicename:text|playduration:int"
[2025-03-10 02:43:32.151 -07:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: Received : "datecreated:datetime|userid:text|itemid:text|itemtype:text|itemname:text|playbackmethod:text|clientname:text|devicename:text|playduration:int"
[2025-03-10 02:43:32.161 -07:00] [WRN] [1] Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager: No XML encryptor configured. Key {aae7db30-ba23-49d4-aa2b-f0a5446f4362} may be persisted to storage in unencrypted form.
[2025-03-10 02:43:32.168 -07:00] [INF] [1] Jellyfin.LiveTv.Timers.TimerManager: Loading live tv data from "/config/data/livetv/timers.json"
[2025-03-10 02:43:32.597 -07:00] [WRN] [1] Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware: The WebRootPath was not found: "/wwwroot". Static files may be unavailable.
[2025-03-10 02:43:32.622 -07:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Running startup tasks
[2025-03-10 02:43:32.622 -07:00] [INF] [1] InfuseSync.ScheduledTasks.HousekeepingTask: Infuse housekeeping task scheduled.
[2025-03-10 02:43:32.624 -07:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.TaskCleanDb: TaskCleanDb Loaded
[2025-03-10 02:43:32.625 -07:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.TaskRunBackup: TaskRunBackup Loaded
[2025-03-10 02:43:32.639 -07:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Remove Old Cached Data" set to fire at 2025-03-11 00:01:00.000 -07:00, which is 21:17:27.3602016 from now.
[2025-03-10 02:43:32.641 -07:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Detect and Analyze Media Segments" set to fire at 2025-03-11 00:00:00.000 -07:00, which is 21:16:27.3584036 from now.
[2025-03-10 02:43:32.642 -07:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Playback Reporting Trim Db" set to fire at 2025-03-11 00:00:00.000 -07:00, which is 21:16:27.3579077 from now.
[2025-03-10 02:43:32.714 -07:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Found ffmpeg version "7.0.2"
[2025-03-10 02:43:32.750 -07:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available "decoders": ["libdav1d", "av1", "av1_cuvid", "av1_qsv", "h264", "h264_qsv", "h264_cuvid", "hevc", "hevc_qsv", "hevc_cuvid", "mpeg2video", "mpeg2_qsv", "mpeg2_cuvid", "mpeg4", "mpeg4_cuvid", "msmpeg4", "vc1_qsv", "vc1_cuvid", "vp8", "libvpx", "vp8_cuvid", "vp8_qsv", "vp9", "libvpx-vp9", "vp9_cuvid", "vp9_qsv", "aac", "ac3", "ac4", "dca", "flac", "mp3", "truehd"]
[2025-03-10 02:43:32.772 -07:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available "encoders": ["libsvtav1", "av1_nvenc", "av1_qsv", "av1_amf", "av1_vaapi", "libx264", "h264_amf", "h264_nvenc", "h264_qsv", "h264_v4l2m2m", "h264_vaapi", "libx265", "hevc_amf", "hevc_nvenc", "hevc_qsv", "hevc_vaapi", "mjpeg_qsv", "mjpeg_vaapi", "aac", "libfdk_aac", "ac3", "alac", "dca", "flac", "libmp3lame", "libopus", "truehd", "libvorbis", "srt"]
[2025-03-10 02:43:32.797 -07:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available filters: ["bwdif_cuda", "deinterlace_qsv", "deinterlace_vaapi", "flip_vulkan", "hwupload_cuda", "hwupload_vaapi", "libplacebo", "overlay_opencl", "overlay_qsv", "overlay_vaapi", "overlay_vulkan", "overlay_cuda", "procamp_vaapi", "scale_cuda", "scale_opencl", "scale_qsv", "scale_vaapi", "scale_vulkan", "tonemapx", "tonemap_cuda", "tonemap_opencl", "tonemap_vaapi", "transpose_cuda", "transpose_opencl", "transpose_vaapi", "transpose_vulkan", "vpp_qsv", "yadif_cuda", "zscale", "alphasrc"]
[2025-03-10 02:43:32.958 -07:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available hwaccel types: ["cuda", "vaapi", "qsv", "drm", "opencl", "vulkan"]
[2025-03-10 02:43:35.663 -07:00] [INF] [17] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Clean Transcode Directory" Completed after 0 minute(s) and 0 seconds
[2025-03-10 02:43:35.782 -07:00] [INF] [18] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Clean up collections and playlists" Completed after 0 minute(s) and 0 seconds
[2025-03-10 02:43:36.791 -07:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: FFmpeg: "/usr/lib/jellyfin-ffmpeg/ffmpeg"
[2025-03-10 02:43:36.791 -07:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: ServerId: "131e40d06bf54dffa8bb9993b6a05993"
[2025-03-10 02:43:36.791 -07:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Core startup complete
[2025-03-10 02:43:36.791 -07:00] [INF] [1] Main: Startup complete 0:00:28.0251472
[2025-03-10 02:43:38.800 -07:00] [INF] [8] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Update Plugins" Completed after 0 minute(s) and 3 seconds
[2025-03-10 02:43:58.011 -07:00] [INF] [11] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.69.1" request
[2025-03-10 02:43:58.032 -07:00] [ERR] [15] Microsoft.EntityFrameworkCore.Update: An exception occurred in the database while saving changes for context type '"Jellyfin.Server.Implementations.JellyfinDbContext"'."
""Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
   at Microsoft.Data.Sqlite.SqliteDataRecord.Dispose()
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at System.Data.Common.DbDataReader.NextResultAsync(CancellationToken cancellationToken)
--- End of stack trace from previous location ---
   at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)"
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
   at Microsoft.Data.Sqlite.SqliteDataRecord.Dispose()
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at System.Data.Common.DbDataReader.NextResultAsync(CancellationToken cancellationToken)
--- End of stack trace from previous location ---
   at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Jellyfin.Server.Implementations.Activity.ActivityManager.CreateAsync(ActivityLog entry)
   at Jellyfin.Server.Implementations.Activity.ActivityManager.CreateAsync(ActivityLog entry)
   at Jellyfin.Server.Implementations.Events.Consumers.Session.SessionStartedLogger.OnEvent(SessionStartedEventArgs eventArgs)
   at Jellyfin.Server.Implementations.Events.EventManager.PublishInternal[T](T eventArgs)
[2025-03-10 02:43:58.033 -07:00] [ERR] [15] Jellyfin.Server.Implementations.Events.EventManager: Uncaught exception in EventConsumer "Jellyfin.Server.Implementations.Events.Consumers.Session.SessionStartedLogger": 
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
   at Microsoft.Data.Sqlite.SqliteDataRecord.Dispose()
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at System.Data.Common.DbDataReader.NextResultAsync(CancellationToken cancellationToken)
--- End of stack trace from previous location ---
   at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Jellyfin.Server.Implementations.Activity.ActivityManager.CreateAsync(ActivityLog entry)
   at Jellyfin.Server.Implementations.Activity.ActivityManager.CreateAsync(ActivityLog entry)
   at Jellyfin.Server.Implementations.Events.Consumers.Session.SessionStartedLogger.OnEvent(SessionStartedEventArgs eventArgs)
   at Jellyfin.Server.Implementations.Events.EventManager.PublishInternal[T](T eventArgs)
[2025-03-10 02:44:31.483 -07:00] [INF] [19] Emby.Server.Implementations.MediaEncoder.EncodingManager: Skipping chapter image extraction for "Door #16" as the average chapter duration 0 was lower than the minimum threshold 10000000
[2025-03-10 02:44:33.282 -07:00] [INF] [19] Emby.Server.Implementations.MediaEncoder.EncodingManager: Skipping chapter image extraction for "Kindest Cut" as the average chapter duration 0 was lower than the minimum threshold 10000000
[2025-03-10 02:44:33.489 -07:00] [INF] [18] Emby.Server.Implementations.ScheduledTasks.TaskManager: Attempting to cancel Scheduled Task "Extract Chapter Images"
[2025-03-10 02:44:33.489 -07:00] [INF] [19] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Extract Chapter Images" Cancelled after 0 minute(s) and 3 seconds
[2025-03-10 02:46:22.073 -07:00] [INF] [18] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2025-03-10 02:46:34.073 -07:00] [INF] [18] Emby.Server.Implementations.Session.SessionWebSocketListener: Lost 1 WebSockets.
[2025-03-10 02:47:52.075 -07:00] [WRN] [25] Emby.Server.Implementations.HttpServer.WebSocketConnection: WS "192.168.69.1" error receiving data: "The remote party closed the WebSocket connection without completing the close handshake."
[2025-03-10 02:47:52.086 -07:00] [INF] [25] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.69.1" closed
[2025-03-10 03:00:00.400 -07:00] [ERR] [54] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL "GET" "/Users/bf163c66607f4e6f9095fac3c0e672af/Items".
System.ArgumentException: Invalid parent id: 44e9e43b-4061-ccf7-f51d-c2c4f84e7afd
   at Emby.Server.Implementations.Library.LibraryManager.GetParentItem(Nullable`1 parentId, Nullable`1 userId)
   at Jellyfin.Api.Controllers.ItemsController.GetItems(Nullable`1 userId, String maxOfficialRating, Nullable`1 hasThemeSong, Nullable`1 hasThemeVideo, Nullable`1 hasSubtitles, Nullable`1 hasSpecialFeature, Nullable`1 hasTrailer, Nullable`1 adjacentTo, Nullable`1 indexNumber, Nullable`1 parentIndexNumber, Nullable`1 hasParentalRating, Nullable`1 isHd, Nullable`1 is4K, LocationType[] locationTypes, LocationType[] excludeLocationTypes, Nullable`1 isMissing, Nullable`1 isUnaired, Nullable`1 minCommunityRating, Nullable`1 minCriticRating, Nullable`1 minPremiereDate, Nullable`1 minDateLastSaved, Nullable`1 minDateLastSavedForUser, Nullable`1 maxPremiereDate, Nullable`1 hasOverview, Nullable`1 hasImdbId, Nullable`1 hasTmdbId, Nullable`1 hasTvdbId, Nullable`1 isMovie, Nullable`1 isSeries, Nullable`1 isNews, Nullable`1 isKids, Nullable`1 isSports, Guid[] excludeItemIds, Nullable`1 startIndex, Nullable`1 limit, Nullable`1 recursive, String searchTerm, SortOrder[] sortOrder, Nullable`1 parentId, ItemFields[] fields, BaseItemKind[] excludeItemTypes, BaseItemKind[] includeItemTypes, ItemFilter[] filters, Nullable`1 isFavorite, MediaType[] mediaTypes, ImageType[] imageTypes, ItemSortBy[] sortBy, Nullable`1 isPlayed, String[] genres, String[] officialRatings, String[] tags, Int32[] years, Nullable`1 enableUserData, Nullable`1 imageTypeLimit, ImageType[] enableImageTypes, String person, Guid[] personIds, String[] personTypes, String[] studios, String[] artists, Guid[] excludeArtistIds, Guid[] artistIds, Guid[] albumArtistIds, Guid[] contributingArtistIds, String[] albums, Guid[] albumIds, Guid[] ids, VideoType[] videoTypes, String minOfficialRating, Nullable`1 isLocked, Nullable`1 isPlaceHolder, Nullable`1 hasOfficialRating, Nullable`1 collapseBoxSetItems, Nullable`1 minWidth, Nullable`1 minHeight, Nullable`1 maxWidth, Nullable`1 maxHeight, Nullable`1 is3D, SeriesStatus[] seriesStatus, String nameStartsWithOrGreater, String nameStartsWith, String nameLessThan, Guid[] studioIds, Guid[] genreIds, Boolean enableTotalRecordCount, Nullable`1 enableImages)
   at Jellyfin.Api.Controllers.ItemsController.GetItemsByUserIdLegacy(Guid userId, String maxOfficialRating, Nullable`1 hasThemeSong, Nullable`1 hasThemeVideo, Nullable`1 hasSubtitles, Nullable`1 hasSpecialFeature, Nullable`1 hasTrailer, Nullable`1 adjacentTo, Nullable`1 parentIndexNumber, Nullable`1 hasParentalRating, Nullable`1 isHd, Nullable`1 is4K, LocationType[] locationTypes, LocationType[] excludeLocationTypes, Nullable`1 isMissing, Nullable`1 isUnaired, Nullable`1 minCommunityRating, Nullable`1 minCriticRating, Nullable`1 minPremiereDate, Nullable`1 minDateLastSaved, Nullable`1 minDateLastSavedForUser, Nullable`1 maxPremiereDate, Nullable`1 hasOverview, Nullable`1 hasImdbId, Nullable`1 hasTmdbId, Nullable`1 hasTvdbId, Nullable`1 isMovie, Nullable`1 isSeries, Nullable`1 isNews, Nullable`1 isKids, Nullable`1 isSports, Guid[] excludeItemIds, Nullable`1 startIndex, Nullable`1 limit, Nullable`1 recursive, String searchTerm, SortOrder[] sortOrder, Nullable`1 parentId, ItemFields[] fields, BaseItemKind[] excludeItemTypes, BaseItemKind[] includeItemTypes, ItemFilter[] filters, Nullable`1 isFavorite, MediaType[] mediaTypes, ImageType[] imageTypes, ItemSortBy[] sortBy, Nullable`1 isPlayed, String[] genres, String[] officialRatings, String[] tags, Int32[] years, Nullable`1 enableUserData, Nullable`1 imageTypeLimit, ImageType[] enableImageTypes, String person, Guid[] personIds, String[] personTypes, String[] studios, String[] artists, Guid[] excludeArtistIds, Guid[] artistIds, Guid[] albumArtistIds, Guid[] contributingArtistIds, String[] albums, Guid[] albumIds, Guid[] ids, VideoType[] videoTypes, String minOfficialRating, Nullable`1 isLocked, Nullable`1 isPlaceHolder, Nullable`1 hasOfficialRating, Nullable`1 collapseBoxSetItems, Nullable`1 minWidth, Nullable`1 minHeight, Nullable`1 maxWidth, Nullable`1 maxHeight, Nullable`1 is3D, SeriesStatus[] seriesStatus, String nameStartsWithOrGreater, String nameStartsWith, String nameLessThan, Guid[] studioIds, Guid[] genreIds, Boolean enableTotalRecordCount, Nullable`1 enableImages)
   at lambda_method1336(Closure, Object, Object[])
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Jellyfin.Api.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
   at Jellyfin.Api.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
   at Jellyfin.Api.Middleware.IPBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
   at Jellyfin.Api.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
   at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
   at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context)
[2025-03-10 03:10:00.688 -07:00] [ERR] [23] Microsoft.EntityFrameworkCore.Update: An exception occurred in the database while saving changes for context type '"Jellyfin.Server.Implementations.JellyfinDbContext"'."
""Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
   at Microsoft.Data.Sqlite.SqliteDataRecord.Dispose()
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at System.Data.Common.DbDataReader.NextResultAsync(CancellationToken cancellationToken)
--- End of stack trace from previous location ---
   at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)"
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
   at Microsoft.Data.Sqlite.SqliteDataRecord.Dispose()
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at System.Data.Common.DbDataReader.NextResultAsync(CancellationToken cancellationToken)
--- End of stack trace from previous location ---
   at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device)
   at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device)
   at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString)
   at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString)
   at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfo(HttpRequest requestContext)
   at Emby.Server.Implementations.HttpServer.Security.AuthService.Authenticate(HttpRequest request)
   at Jellyfin.Api.Auth.CustomAuthenticationHandler.HandleAuthenticateAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
   at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
[2025-03-10 03:10:00.689 -07:00] [ERR] [23] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL "GET" "/Users/Me".
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
   at Microsoft.Data.Sqlite.SqliteDataRecord.Dispose()
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at System.Data.Common.DbDataReader.NextResultAsync(CancellationToken cancellationToken)
--- End of stack trace from previous location ---
   at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device)
   at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device)
   at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString)
   at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString)
   at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfo(HttpRequest requestContext)
   at Emby.Server.Implementations.HttpServer.Security.AuthService.Authenticate(HttpRequest request)
   at Jellyfin.Api.Auth.CustomAuthenticationHandler.HandleAuthenticateAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
   at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
   at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context)


/////////////
Snippet from debug logs, notably there are a ton of MediaSegments DB commands

""SELECT EXISTS (
    SELECT 1
    FROM \"MediaSegments\" AS \"m\"
    WHERE \"m\".\"ItemId\" = @__itemId_0)"
[2025-03-09 08:55:05.353 -07:00] [INF] [86] Microsoft.EntityFrameworkCore.Database.Command: Executed DbCommand ("148"ms) [Parameters=["@__itemId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
""SELECT EXISTS (
    SELECT 1
    FROM \"MediaSegments\" AS \"m\"
    WHERE \"m\".\"ItemId\" = @__itemId_0)"
[2025-03-09 08:55:05.392 -07:00] [INF] [87] Microsoft.EntityFrameworkCore.Database.Command: Executed DbCommand ("185"ms) [Parameters=["@__itemId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
""SELECT EXISTS (
    SELECT 1
    FROM \"MediaSegments\" AS \"m\"
    WHERE \"m\".\"ItemId\" = @__itemId_0)"
[2025-03-09 08:55:05.457 -07:00] [INF] [31] Microsoft.EntityFrameworkCore.Database.Command: Executed DbCommand ("266"ms) [Parameters=["@__itemId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
""SELECT EXISTS (
    SELECT 1
    FROM \"MediaSegments\" AS \"m\"
    WHERE \"m\".\"ItemId\" = @__itemId_0)"
[2025-03-09 08:55:05.509 -07:00] [INF] [42] Microsoft.EntityFrameworkCore.Database.Command: Executed DbCommand ("317"ms) [Parameters=["@__itemId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
""SELECT EXISTS (
    SELECT 1
    FROM \"MediaSegments\" AS \"m\"
    WHERE \"m\".\"ItemId\" = @__itemId_0)"
[2025-03-09 08:55:05.551 -07:00] [INF] [11] Microsoft.EntityFrameworkCore.Database.Command: Executed DbCommand ("351"ms) [Parameters=["@__itemId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
""SELECT EXISTS (
    SELECT 1
    FROM \"MediaSegments\" AS \"m\"
    WHERE \"m\".\"ItemId\" = @__itemId_0)"
[2025-03-09 08:55:05.614 -07:00] [INF] [89] Microsoft.EntityFrameworkCore.Database.Command: Executed DbCommand ("413"ms) [Parameters=["@__itemId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
""SELECT EXISTS (
    SELECT 1
    FROM \"MediaSegments\" AS \"m\"
    WHERE \"m\".\"ItemId\" = @__itemId_0)"
[2025-03-09 08:55:05.659 -07:00] [INF] [62] Microsoft.EntityFrameworkCore.Database.Command: Executed DbCommand ("454"ms) [Parameters=["@__itemId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
""SELECT EXISTS (
    SELECT 1
    FROM \"MediaSegments\" AS \"m\"
    WHERE \"m\".\"ItemId\" = @__itemId_0)"
[2025-03-09 08:55:05.703 -07:00] [INF] [71] Microsoft.EntityFrameworkCore.Database.Command: Executed DbCommand ("469"ms) [Parameters=["@__itemId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
""SELECT EXISTS (
    SELECT 1
    FROM \"MediaSegments\" AS \"m\"
    WHERE \"m\".\"ItemId\" = @__itemId_0)"
[2025-03-09 08:55:05.747 -07:00] [INF] [3] Microsoft.AspNetCore.Hosting.Diagnostics: Request starting "HTTP/1.1" "GET" "http"://"jellyfin.redacted""""/sessions""" - null null
[2025-03-09 08:55:05.747 -07:00] [INF] [3] Microsoft.EntityFrameworkCore.Database.Command: Executed DbCommand ("0"ms) [Parameters=["@__token_0='?' (Size = 32)"], CommandType='Text', CommandTimeout='30']"
""SELECT \"a\".\"Id\", \"a\".\"AccessToken\", \"a\".\"DateCreated\", \"a\".\"DateLastActivity\", \"a\".\"Name\"
FROM \"ApiKeys\" AS \"a\"
WHERE \"a\".\"AccessToken\" = @__token_0
LIMIT 1"
[2025-03-09 08:55:05.747 -07:00] [INF] [3] Microsoft.AspNetCore.Routing.EndpointMiddleware: Executing endpoint '"Jellyfin.Api.Controllers.SessionController.GetSessions (Jellyfin.Api)"'
[2025-03-09 08:55:05.747 -07:00] [INF] [3] Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Route matched with "{action = \"GetSessions\", controller = \"Session\"}". Executing controller action with signature "Microsoft.AspNetCore.Mvc.ActionResult`1[System.Collections.Generic.IReadOnlyList`1[MediaBrowser.Model.Dto.SessionInfoDto]] GetSessions(System.Nullable`1[System.Guid], System.String, System.Nullable`1[System.Int32])" on controller "Jellyfin.Api.Controllers.SessionController" ("Jellyfin.Api").
[2025-03-09 08:55:05.747 -07:00] [INF] [3] Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor: Executing "OkResult`1", writing value of type '"System.Collections.Generic.List`1[[MediaBrowser.Model.Dto.SessionInfoDto, MediaBrowser.Model, Version=10.10.6.0, Culture=neutral, PublicKeyToken=null]]"'.
[2025-03-09 08:55:05.748 -07:00] [INF] [3] Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Executed action "Jellyfin.Api.Controllers.SessionController.GetSessions (Jellyfin.Api)" in 0.9478ms
[2025-03-09 08:55:05.748 -07:00] [INF] [3] Microsoft.AspNetCore.Routing.EndpointMiddleware: Executed endpoint '"Jellyfin.Api.Controllers.SessionController.GetSessions (Jellyfin.Api)"'
[2025-03-09 08:55:05.748 -07:00] [INF] [3] Microsoft.AspNetCore.Hosting.Diagnostics: Request finished "HTTP/1.1" "GET" "https"://"jellyfin.redacted""""/sessions""" - 200 null "application/json; charset=utf-8" 1.764ms
[2025-03-09 08:55:05.764 -07:00] [INF] [31] Microsoft.EntityFrameworkCore.Database.Command: Executed DbCommand ("102"ms) [Parameters=["@__itemId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
""SELECT EXISTS (
    SELECT 1
    FROM \"MediaSegments\" AS \"m\"
    WHERE \"m\".\"ItemId\" = @__itemId_0)"
[2025-03-09 08:55:05.764 -07:00] [INF] [45] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Processing playback tracker : "ef732e332cbbbc1639700a22ed29f0da2c2c8fa0-bf163c66607f4e6f9095fac3c0e672af-e39153a6b99fd6dd6ad8795c5adcade8"
[2025-03-09 08:55:05.768 -07:00] [INF] [3] Microsoft.AspNetCore.Hosting.Diagnostics: Request starting "HTTP/1.1" "POST" "http"://"192.168.69.245:8096""""/Sessions/Playing/Progress""" - "application/json" 349
[2025-03-09 08:55:05.768 -07:00] [INF] [3] Microsoft.EntityFrameworkCore.Database.Command: Executed DbCommand ("1"ms) [Parameters=["@p10='?' (DbType = Int32), @p0='?' (Size = 32), @p1='?' (Size = 10), @p2='?' (Size = 6), @p3='?' (DbType = DateTime), @p4='?' (DbType = DateTime), @p5='?' (DbType = DateTime), @p6='?' (Size = 40), @p7='?' (Size = 6), @p8='?' (DbType = Boolean), @p9='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
""UPDATE \"Devices\" SET \"AccessToken\" = @p0, \"AppName\" = @p1, \"AppVersion\" = @p2, \"DateCreated\" = @p3, \"DateLastActivity\" = @p4, \"DateModified\" = @p5, \"DeviceId\" = @p6, \"DeviceName\" = @p7, \"IsActive\" = @p8, \"UserId\" = @p9
WHERE \"Id\" = @p10
RETURNING 1;"
[2025-03-09 08:55:05.770 -07:00] [ERR] [3] Microsoft.EntityFrameworkCore.Update: An exception occurred in the database while saving changes for context type '"Jellyfin.Server.Implementations.JellyfinDbContext"'."
""Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
   at Microsoft.Data.Sqlite.SqliteDataRecord.Dispose()
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at System.Data.Common.DbDataReader.NextResultAsync(CancellationToken cancellationToken)
--- End of stack trace from previous location ---
   at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)"
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
   at Microsoft.Data.Sqlite.SqliteDataRecord.Dispose()
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at System.Data.Common.DbDataReader.NextResultAsync(CancellationToken cancellationToken)
--- End of stack trace from previous location ---
   at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device)
   at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device)
   at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString)
   at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString)
   at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfo(HttpRequest requestContext)
   at Emby.Server.Implementations.HttpServer.Security.AuthService.Authenticate(HttpRequest request)
[2025-03-09 08:55:05.770 -07:00] [ERR] [3] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL "POST" "/Sessions/Playing/Progress".
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
   at Microsoft.Data.Sqlite.SqliteDataRecord.Dispose()
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at System.Data.Common.DbDataReader.NextResultAsync(CancellationToken cancellationToken)
--- End of stack trace from previous location ---
   at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device)
   at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device)
   at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString)
   at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString)
   at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfo(HttpRequest requestContext)
   at Emby.Server.Implementations.HttpServer.Security.AuthService.Authenticate(HttpRequest request)
   at Jellyfin.Api.Auth.CustomAuthenticationHandler.HandleAuthenticateAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
   at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
   at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context)
[2025-03-09 08:55:05.771 -07:00] [INF] [3] Microsoft.AspNetCore.Hosting.Diagnostics: Request finished "HTTP/1.1" "POST" "http"://"192.168.69.245:8096""""/Sessions/Playing/Progress""" - 500 null "text/plain" 3.3869ms
[2025-03-09 08:55:05.800 -07:00] [INF] [62] Microsoft.EntityFrameworkCore.Database.Command: Executed DbCommand ("137"ms) [Parameters=["@__itemId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"

FFmpeg logs


Client / Browser logs

No response

Relevant screenshots or videos

No response

Additional information

I tried setting JELLYFIN_SQLITE__disableSecondLevelCache=true, changed parallel encoding and library scan instances to 1, as well as set trickplay threads to 1. Also tried allocating fewer cores to the container. I am not sure what causes this behavior. There are lots of MediaSegment DB commands as seen in the debug logs, and throughout the debug logs the DB response time can be as high as 10,000ms. This seems incredibly slow on an SSD. I am not sure if the slow DB is caused by Jellyfin having some other error, or if the DB being overwhelmed is causing the unresponsiveness.

System specs:
CPU: 64 core Epyc 7702
RAM: 512GB
Storage: RAID 1 WD Ultrastar DC SN200 3.2TB PCIe SSDs

Originally created by @SLemons13 on GitHub (Mar 11, 2025). ### Description of the bug Intermittent 'database is locked' errors despite following all troubleshooting steps found on github issues/forums. Very similar behavior to issue #12312, though it does not seem to be caused by library scans. I see an error about the database being locked in the logs, the web ui becomes unresponsive, and memory usage will begin to balloon until the container is stopped. Has been happening for that last couple months, I can't find a correlation to any particular task/action which causes it. Have been dealing with this from version 10.10.3-10.10.6 ### Reproduction steps 1. Start Jellyfin 2. Wait. It has happened 5 minutes after starting the server, or up to 4 days later ### What is the current _bug_ behavior? I see an error about the database being locked in the logs, the web ui becomes unresponsive, and memory usage will begin to balloon until the container is stopped. ### What is the expected _correct_ behavior? No stability issues ### Jellyfin Server version 10.10.0+ ### Specify commit id _No response_ ### Specify unstable release number _No response_ ### Specify version number _No response_ ### Specify the build version 10.10.6 ### Environment ```markdown - OS: TrueNAS SCALE 24.10.2 - Linux Kernel: 6.6.44 - Virtualization: Docker (jellyfin/jellyfin image) - Clients: All - Browser: Firefox 136 - FFmpeg Version: 7.0.2 - Playback Method: All - Hardware Acceleration: QSV - GPU Model: Arc A770 - Plugins: Fanart, InfuseDB, Intro Skipper, Open Subtitles, Playback Reporting, Reports, TMDb box sets - Reverse Proxy: Nginx - Base URL: none - Networking: Bridge - Storage: local ``` ### Jellyfin logs ```shell Log from when it happened immediately after starting JF: [2025-03-10 02:43:09.007 -07:00] [INF] [1] Main: Jellyfin version: "10.10.6" [2025-03-10 02:43:09.030 -07:00] [INF] [1] Main: Environment Variables: ["[JELLYFIN_DATA_DIR, /config]", "[JELLYFIN_CACHE_DIR, /cache]", "[JELLYFIN_LOG_DIR, /config/log]", "[JELLYFIN_FFMPEG, /usr/lib/jellyfin-ffmpeg/ffmpeg]", "[JELLYFIN_WEB_DIR, /jellyfin/jellyfin-web]", "[JELLYFIN_SQLITE__disableSecondLevelCache, false]", "[JELLYFIN_PublishedServerUrl, https://jellyfin.redacted]", "[JELLYFIN_CONFIG_DIR, /config/config]"] [2025-03-10 02:43:09.031 -07:00] [INF] [1] Main: Arguments: ["/jellyfin/jellyfin.dll"] [2025-03-10 02:43:09.032 -07:00] [INF] [1] Main: Operating system: "Debian GNU/Linux 12 (bookworm)" [2025-03-10 02:43:09.032 -07:00] [INF] [1] Main: Architecture: X64 [2025-03-10 02:43:09.032 -07:00] [INF] [1] Main: 64-Bit Process: True [2025-03-10 02:43:09.032 -07:00] [INF] [1] Main: User Interactive: True [2025-03-10 02:43:09.032 -07:00] [INF] [1] Main: Processor count: 6 [2025-03-10 02:43:09.032 -07:00] [INF] [1] Main: Program data path: "/config" [2025-03-10 02:43:09.032 -07:00] [INF] [1] Main: Log directory path: "/config/log" [2025-03-10 02:43:09.032 -07:00] [INF] [1] Main: Config directory path: "/config/config" [2025-03-10 02:43:09.032 -07:00] [INF] [1] Main: Cache path: "/cache" [2025-03-10 02:43:09.033 -07:00] [INF] [1] Main: Temp directory path: "/tmp/jellyfin" [2025-03-10 02:43:09.033 -07:00] [INF] [1] Main: Web resources path: "/jellyfin/jellyfin-web" [2025-03-10 02:43:09.033 -07:00] [INF] [1] Main: Application directory: "/jellyfin/" [2025-03-10 02:43:09.146 -07:00] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: "/config/cache" [2025-03-10 02:43:09.266 -07:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies [2025-03-10 02:43:09.310 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Skipping disabled plugin "3.0.0.0" of "Chapter Segments Provider" [2025-03-10 02:43:09.313 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.Fanart, Version=12.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Fanart_12.0.0.0/Jellyfin.Plugin.Fanart.dll" [2025-03-10 02:43:09.315 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "InfuseSync, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/InfuseSync_1.5.0.0/InfuseSync.dll" [2025-03-10 02:43:09.318 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "IntroSkipper, Version=1.10.10.15, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Intro Skipper_1.10.10.15/IntroSkipper.dll" [2025-03-10 02:43:09.320 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.OpenSubtitles, Version=20.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Open Subtitles_20.0.0.0/Jellyfin.Plugin.OpenSubtitles.dll" [2025-03-10 02:43:09.322 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "SQLitePCL.pretty, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Playback Reporting_15.0.0.0/SQLitePCL.pretty.dll" [2025-03-10 02:43:09.322 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.PlaybackReporting, Version=15.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Playback Reporting_15.0.0.0/Jellyfin.Plugin.PlaybackReporting.dll" [2025-03-10 02:43:09.334 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13" from "/config/plugins/Reports_17.0.0.0/SixLabors.Fonts.dll" [2025-03-10 02:43:09.335 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "System.IO.Packaging, Version=4.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from "/config/plugins/Reports_17.0.0.0/System.IO.Packaging.dll" [2025-03-10 02:43:09.353 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "ClosedXML, Version=0.97.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b" from "/config/plugins/Reports_17.0.0.0/ClosedXML.dll" [2025-03-10 02:43:09.446 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "DocumentFormat.OpenXml, Version=2.16.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17" from "/config/plugins/Reports_17.0.0.0/DocumentFormat.OpenXml.dll" [2025-03-10 02:43:09.450 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.Reports, Version=17.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Reports_17.0.0.0/Jellyfin.Plugin.Reports.dll" [2025-03-10 02:43:09.450 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "ExcelNumberFormat, Version=1.1.0.0, Culture=neutral, PublicKeyToken=23c6f5d73be07eca" from "/config/plugins/Reports_17.0.0.0/ExcelNumberFormat.dll" [2025-03-10 02:43:09.450 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.SkinManager, Version=2.0.2.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Skin Manager_2.0.2.0/Jellyfin.Plugin.SkinManager.dll" [2025-03-10 02:43:09.451 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.TMDbBoxSets, Version=11.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/TMDb Box Sets_11.0.0.0/Jellyfin.Plugin.TMDbBoxSets.dll" [2025-03-10 02:43:09.451 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Skipping disabled plugin "1.3.4.0" of "TubeArchivist Metadata" [2025-03-10 02:43:09.511 -07:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"] [2025-03-10 02:43:09.511 -07:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN exclusions: [] [2025-03-10 02:43:09.511 -07:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Used LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"] [2025-03-10 02:43:09.512 -07:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Filtered interface addresses: ["127.0.0.1", "172.16.3.2"] [2025-03-10 02:43:09.513 -07:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Bind Addresses ["0.0.0.0"] [2025-03-10 02:43:09.513 -07:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Remote IP filter is "Allowlist" [2025-03-10 02:43:09.513 -07:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Filtered subnets: [] [2025-03-10 02:43:28.177 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Fanart" "12.0.0.0" [2025-03-10 02:43:28.178 -07:00] [INF] [1] InfuseSync.Plugin: InfuseSync is starting. [2025-03-10 02:43:28.187 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "InfuseSync" "1.5.0.0" [2025-03-10 02:43:28.467 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Intro Skipper" "1.10.10.15" [2025-03-10 02:43:28.474 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Open Subtitles" "20.0.0.0" [2025-03-10 02:43:28.475 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Playback Reporting" "15.0.0.0" [2025-03-10 02:43:28.476 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Reports" "17.0.0.0" [2025-03-10 02:43:28.477 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "SkinManager" "2.0.2.0" [2025-03-10 02:43:28.478 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "TMDb Box Sets" "11.0.0.0" [2025-03-10 02:43:28.478 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "TMDb" "10.10.6.0" [2025-03-10 02:43:28.479 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Studio Images" "10.10.6.0" [2025-03-10 02:43:28.479 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "OMDb" "10.10.6.0" [2025-03-10 02:43:28.489 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "MusicBrainz" "10.10.6.0" [2025-03-10 02:43:28.489 -07:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "AudioDB" "10.10.6.0" [2025-03-10 02:43:28.599 -07:00] [WRN] [1] Microsoft.AspNetCore.DataProtection.Repositories.EphemeralXmlRepository: Using an in-memory repository. Keys will not be persisted to storage. [2025-03-10 02:43:28.599 -07:00] [WRN] [1] Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager: Neither user profile nor HKLM registry available. Using an ephemeral key repository. Protected data will be unavailable when application exits. [2025-03-10 02:43:28.606 -07:00] [INF] [1] Main: Kestrel is listening on "0.0.0.0" [2025-03-10 02:43:28.618 -07:00] [INF] [1] IntroSkipper.Services.Entrypoint: Running startup enqueue [2025-03-10 02:43:28.790 -07:00] [INF] [1] IntroSkipper.Manager.QueueManager: Running enqueue of items in library "Anime Shows" [2025-03-10 02:43:29.514 -07:00] [INF] [1] IntroSkipper.Manager.QueueManager: Running enqueue of items in library "Shows" [2025-03-10 02:43:32.019 -07:00] [INF] [1] IntroSkipper.Manager.QueueManager: Running enqueue of items in library "Recordings" [2025-03-10 02:43:32.020 -07:00] [INF] [1] IntroSkipper.Manager.QueueManager: Running enqueue of items in library "Collections" [2025-03-10 02:43:32.021 -07:00] [INF] [1] IntroSkipper.Manager.QueueManager: Running enqueue of items in library "Movies" [2025-03-10 02:43:32.120 -07:00] [INF] [1] IntroSkipper.Manager.QueueManager: Running enqueue of items in library "Anime Movies" [2025-03-10 02:43:32.128 -07:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: EventMonitorEntryPoint Running [2025-03-10 02:43:32.137 -07:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: Sqlite version: 3.41.2 [2025-03-10 02:43:32.138 -07:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: Sqlite compiler options: ATOMIC_INTRINSICS=1,COMPILER=gcc-9.4.0,DEFAULT_AUTOVACUUM,DEFAULT_CACHE_SIZE=-2000,DEFAULT_FILE_FORMAT=4,DEFAULT_FOREIGN_KEYS,DEFAULT_JOURNAL_SIZE_LIMIT=-1,DEFAULT_MMAP_SIZE=0,DEFAULT_PAGE_SIZE=4096,DEFAULT_PCACHE_INITSZ=20,DEFAULT_RECURSIVE_TRIGGERS,DEFAULT_SECTOR_SIZE=4096,DEFAULT_SYNCHRONOUS=2,DEFAULT_WAL_AUTOCHECKPOINT=1000,DEFAULT_WAL_SYNCHRONOUS=2,DEFAULT_WORKER_THREADS=0,ENABLE_COLUMN_METADATA,ENABLE_FTS3,ENABLE_FTS3_PARENTHESIS,ENABLE_FTS4,ENABLE_FTS5,ENABLE_MATH_FUNCTIONS,ENABLE_RTREE,ENABLE_SNAPSHOT,MALLOC_SOFT_LIMIT=1024,MAX_ATTACHED=10,MAX_COLUMN=2000,MAX_COMPOUND_SELECT=500,MAX_DEFAULT_PAGE_SIZE=8192,MAX_EXPR_DEPTH=1000,MAX_FUNCTION_ARG=127,MAX_LENGTH=1000000000,MAX_LIKE_PATTERN_LENGTH=50000,MAX_MMAP_SIZE=0x7fff0000,MAX_PAGE_COUNT=1073741823,MAX_PAGE_SIZE=65536,MAX_SQL_LENGTH=1000000000,MAX_TRIGGER_DEPTH=1000,MAX_VARIABLE_NUMBER=32766,MAX_VDBE_OP=250000000,MAX_WORKER_THREADS=8,MUTEX_PTHREADS,SYSTEM_MALLOC,TEMP_STORE=1,THREADSAFE=1 [2025-03-10 02:43:32.149 -07:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: Default journal_mode for "/config/data/playback_reporting.db" is "delete" [2025-03-10 02:43:32.150 -07:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: Initialize PlaybackActivity Repository [2025-03-10 02:43:32.151 -07:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: PlaybackActivity table schema OK [2025-03-10 02:43:32.151 -07:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: Expected : "datecreated:datetime|userid:text|itemid:text|itemtype:text|itemname:text|playbackmethod:text|clientname:text|devicename:text|playduration:int" [2025-03-10 02:43:32.151 -07:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: Received : "datecreated:datetime|userid:text|itemid:text|itemtype:text|itemname:text|playbackmethod:text|clientname:text|devicename:text|playduration:int" [2025-03-10 02:43:32.161 -07:00] [WRN] [1] Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager: No XML encryptor configured. Key {aae7db30-ba23-49d4-aa2b-f0a5446f4362} may be persisted to storage in unencrypted form. [2025-03-10 02:43:32.168 -07:00] [INF] [1] Jellyfin.LiveTv.Timers.TimerManager: Loading live tv data from "/config/data/livetv/timers.json" [2025-03-10 02:43:32.597 -07:00] [WRN] [1] Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware: The WebRootPath was not found: "/wwwroot". Static files may be unavailable. [2025-03-10 02:43:32.622 -07:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Running startup tasks [2025-03-10 02:43:32.622 -07:00] [INF] [1] InfuseSync.ScheduledTasks.HousekeepingTask: Infuse housekeeping task scheduled. [2025-03-10 02:43:32.624 -07:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.TaskCleanDb: TaskCleanDb Loaded [2025-03-10 02:43:32.625 -07:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.TaskRunBackup: TaskRunBackup Loaded [2025-03-10 02:43:32.639 -07:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Remove Old Cached Data" set to fire at 2025-03-11 00:01:00.000 -07:00, which is 21:17:27.3602016 from now. [2025-03-10 02:43:32.641 -07:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Detect and Analyze Media Segments" set to fire at 2025-03-11 00:00:00.000 -07:00, which is 21:16:27.3584036 from now. [2025-03-10 02:43:32.642 -07:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Playback Reporting Trim Db" set to fire at 2025-03-11 00:00:00.000 -07:00, which is 21:16:27.3579077 from now. [2025-03-10 02:43:32.714 -07:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Found ffmpeg version "7.0.2" [2025-03-10 02:43:32.750 -07:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available "decoders": ["libdav1d", "av1", "av1_cuvid", "av1_qsv", "h264", "h264_qsv", "h264_cuvid", "hevc", "hevc_qsv", "hevc_cuvid", "mpeg2video", "mpeg2_qsv", "mpeg2_cuvid", "mpeg4", "mpeg4_cuvid", "msmpeg4", "vc1_qsv", "vc1_cuvid", "vp8", "libvpx", "vp8_cuvid", "vp8_qsv", "vp9", "libvpx-vp9", "vp9_cuvid", "vp9_qsv", "aac", "ac3", "ac4", "dca", "flac", "mp3", "truehd"] [2025-03-10 02:43:32.772 -07:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available "encoders": ["libsvtav1", "av1_nvenc", "av1_qsv", "av1_amf", "av1_vaapi", "libx264", "h264_amf", "h264_nvenc", "h264_qsv", "h264_v4l2m2m", "h264_vaapi", "libx265", "hevc_amf", "hevc_nvenc", "hevc_qsv", "hevc_vaapi", "mjpeg_qsv", "mjpeg_vaapi", "aac", "libfdk_aac", "ac3", "alac", "dca", "flac", "libmp3lame", "libopus", "truehd", "libvorbis", "srt"] [2025-03-10 02:43:32.797 -07:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available filters: ["bwdif_cuda", "deinterlace_qsv", "deinterlace_vaapi", "flip_vulkan", "hwupload_cuda", "hwupload_vaapi", "libplacebo", "overlay_opencl", "overlay_qsv", "overlay_vaapi", "overlay_vulkan", "overlay_cuda", "procamp_vaapi", "scale_cuda", "scale_opencl", "scale_qsv", "scale_vaapi", "scale_vulkan", "tonemapx", "tonemap_cuda", "tonemap_opencl", "tonemap_vaapi", "transpose_cuda", "transpose_opencl", "transpose_vaapi", "transpose_vulkan", "vpp_qsv", "yadif_cuda", "zscale", "alphasrc"] [2025-03-10 02:43:32.958 -07:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available hwaccel types: ["cuda", "vaapi", "qsv", "drm", "opencl", "vulkan"] [2025-03-10 02:43:35.663 -07:00] [INF] [17] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Clean Transcode Directory" Completed after 0 minute(s) and 0 seconds [2025-03-10 02:43:35.782 -07:00] [INF] [18] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Clean up collections and playlists" Completed after 0 minute(s) and 0 seconds [2025-03-10 02:43:36.791 -07:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: FFmpeg: "/usr/lib/jellyfin-ffmpeg/ffmpeg" [2025-03-10 02:43:36.791 -07:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: ServerId: "131e40d06bf54dffa8bb9993b6a05993" [2025-03-10 02:43:36.791 -07:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Core startup complete [2025-03-10 02:43:36.791 -07:00] [INF] [1] Main: Startup complete 0:00:28.0251472 [2025-03-10 02:43:38.800 -07:00] [INF] [8] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Update Plugins" Completed after 0 minute(s) and 3 seconds [2025-03-10 02:43:58.011 -07:00] [INF] [11] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.69.1" request [2025-03-10 02:43:58.032 -07:00] [ERR] [15] Microsoft.EntityFrameworkCore.Update: An exception occurred in the database while saving changes for context type '"Jellyfin.Server.Implementations.JellyfinDbContext"'." ""Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'. at Microsoft.Data.Sqlite.SqliteDataRecord.Dispose() at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at System.Data.Common.DbDataReader.NextResultAsync(CancellationToken cancellationToken) --- End of stack trace from previous location --- at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)" Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'. at Microsoft.Data.Sqlite.SqliteDataRecord.Dispose() at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at System.Data.Common.DbDataReader.NextResultAsync(CancellationToken cancellationToken) --- End of stack trace from previous location --- at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Jellyfin.Server.Implementations.Activity.ActivityManager.CreateAsync(ActivityLog entry) at Jellyfin.Server.Implementations.Activity.ActivityManager.CreateAsync(ActivityLog entry) at Jellyfin.Server.Implementations.Events.Consumers.Session.SessionStartedLogger.OnEvent(SessionStartedEventArgs eventArgs) at Jellyfin.Server.Implementations.Events.EventManager.PublishInternal[T](T eventArgs) [2025-03-10 02:43:58.033 -07:00] [ERR] [15] Jellyfin.Server.Implementations.Events.EventManager: Uncaught exception in EventConsumer "Jellyfin.Server.Implementations.Events.Consumers.Session.SessionStartedLogger": Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'. at Microsoft.Data.Sqlite.SqliteDataRecord.Dispose() at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at System.Data.Common.DbDataReader.NextResultAsync(CancellationToken cancellationToken) --- End of stack trace from previous location --- at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Jellyfin.Server.Implementations.Activity.ActivityManager.CreateAsync(ActivityLog entry) at Jellyfin.Server.Implementations.Activity.ActivityManager.CreateAsync(ActivityLog entry) at Jellyfin.Server.Implementations.Events.Consumers.Session.SessionStartedLogger.OnEvent(SessionStartedEventArgs eventArgs) at Jellyfin.Server.Implementations.Events.EventManager.PublishInternal[T](T eventArgs) [2025-03-10 02:44:31.483 -07:00] [INF] [19] Emby.Server.Implementations.MediaEncoder.EncodingManager: Skipping chapter image extraction for "Door #16" as the average chapter duration 0 was lower than the minimum threshold 10000000 [2025-03-10 02:44:33.282 -07:00] [INF] [19] Emby.Server.Implementations.MediaEncoder.EncodingManager: Skipping chapter image extraction for "Kindest Cut" as the average chapter duration 0 was lower than the minimum threshold 10000000 [2025-03-10 02:44:33.489 -07:00] [INF] [18] Emby.Server.Implementations.ScheduledTasks.TaskManager: Attempting to cancel Scheduled Task "Extract Chapter Images" [2025-03-10 02:44:33.489 -07:00] [INF] [19] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Extract Chapter Images" Cancelled after 0 minute(s) and 3 seconds [2025-03-10 02:46:22.073 -07:00] [INF] [18] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets. [2025-03-10 02:46:34.073 -07:00] [INF] [18] Emby.Server.Implementations.Session.SessionWebSocketListener: Lost 1 WebSockets. [2025-03-10 02:47:52.075 -07:00] [WRN] [25] Emby.Server.Implementations.HttpServer.WebSocketConnection: WS "192.168.69.1" error receiving data: "The remote party closed the WebSocket connection without completing the close handshake." [2025-03-10 02:47:52.086 -07:00] [INF] [25] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.69.1" closed [2025-03-10 03:00:00.400 -07:00] [ERR] [54] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL "GET" "/Users/bf163c66607f4e6f9095fac3c0e672af/Items". System.ArgumentException: Invalid parent id: 44e9e43b-4061-ccf7-f51d-c2c4f84e7afd at Emby.Server.Implementations.Library.LibraryManager.GetParentItem(Nullable`1 parentId, Nullable`1 userId) at Jellyfin.Api.Controllers.ItemsController.GetItems(Nullable`1 userId, String maxOfficialRating, Nullable`1 hasThemeSong, Nullable`1 hasThemeVideo, Nullable`1 hasSubtitles, Nullable`1 hasSpecialFeature, Nullable`1 hasTrailer, Nullable`1 adjacentTo, Nullable`1 indexNumber, Nullable`1 parentIndexNumber, Nullable`1 hasParentalRating, Nullable`1 isHd, Nullable`1 is4K, LocationType[] locationTypes, LocationType[] excludeLocationTypes, Nullable`1 isMissing, Nullable`1 isUnaired, Nullable`1 minCommunityRating, Nullable`1 minCriticRating, Nullable`1 minPremiereDate, Nullable`1 minDateLastSaved, Nullable`1 minDateLastSavedForUser, Nullable`1 maxPremiereDate, Nullable`1 hasOverview, Nullable`1 hasImdbId, Nullable`1 hasTmdbId, Nullable`1 hasTvdbId, Nullable`1 isMovie, Nullable`1 isSeries, Nullable`1 isNews, Nullable`1 isKids, Nullable`1 isSports, Guid[] excludeItemIds, Nullable`1 startIndex, Nullable`1 limit, Nullable`1 recursive, String searchTerm, SortOrder[] sortOrder, Nullable`1 parentId, ItemFields[] fields, BaseItemKind[] excludeItemTypes, BaseItemKind[] includeItemTypes, ItemFilter[] filters, Nullable`1 isFavorite, MediaType[] mediaTypes, ImageType[] imageTypes, ItemSortBy[] sortBy, Nullable`1 isPlayed, String[] genres, String[] officialRatings, String[] tags, Int32[] years, Nullable`1 enableUserData, Nullable`1 imageTypeLimit, ImageType[] enableImageTypes, String person, Guid[] personIds, String[] personTypes, String[] studios, String[] artists, Guid[] excludeArtistIds, Guid[] artistIds, Guid[] albumArtistIds, Guid[] contributingArtistIds, String[] albums, Guid[] albumIds, Guid[] ids, VideoType[] videoTypes, String minOfficialRating, Nullable`1 isLocked, Nullable`1 isPlaceHolder, Nullable`1 hasOfficialRating, Nullable`1 collapseBoxSetItems, Nullable`1 minWidth, Nullable`1 minHeight, Nullable`1 maxWidth, Nullable`1 maxHeight, Nullable`1 is3D, SeriesStatus[] seriesStatus, String nameStartsWithOrGreater, String nameStartsWith, String nameLessThan, Guid[] studioIds, Guid[] genreIds, Boolean enableTotalRecordCount, Nullable`1 enableImages) at Jellyfin.Api.Controllers.ItemsController.GetItemsByUserIdLegacy(Guid userId, String maxOfficialRating, Nullable`1 hasThemeSong, Nullable`1 hasThemeVideo, Nullable`1 hasSubtitles, Nullable`1 hasSpecialFeature, Nullable`1 hasTrailer, Nullable`1 adjacentTo, Nullable`1 parentIndexNumber, Nullable`1 hasParentalRating, Nullable`1 isHd, Nullable`1 is4K, LocationType[] locationTypes, LocationType[] excludeLocationTypes, Nullable`1 isMissing, Nullable`1 isUnaired, Nullable`1 minCommunityRating, Nullable`1 minCriticRating, Nullable`1 minPremiereDate, Nullable`1 minDateLastSaved, Nullable`1 minDateLastSavedForUser, Nullable`1 maxPremiereDate, Nullable`1 hasOverview, Nullable`1 hasImdbId, Nullable`1 hasTmdbId, Nullable`1 hasTvdbId, Nullable`1 isMovie, Nullable`1 isSeries, Nullable`1 isNews, Nullable`1 isKids, Nullable`1 isSports, Guid[] excludeItemIds, Nullable`1 startIndex, Nullable`1 limit, Nullable`1 recursive, String searchTerm, SortOrder[] sortOrder, Nullable`1 parentId, ItemFields[] fields, BaseItemKind[] excludeItemTypes, BaseItemKind[] includeItemTypes, ItemFilter[] filters, Nullable`1 isFavorite, MediaType[] mediaTypes, ImageType[] imageTypes, ItemSortBy[] sortBy, Nullable`1 isPlayed, String[] genres, String[] officialRatings, String[] tags, Int32[] years, Nullable`1 enableUserData, Nullable`1 imageTypeLimit, ImageType[] enableImageTypes, String person, Guid[] personIds, String[] personTypes, String[] studios, String[] artists, Guid[] excludeArtistIds, Guid[] artistIds, Guid[] albumArtistIds, Guid[] contributingArtistIds, String[] albums, Guid[] albumIds, Guid[] ids, VideoType[] videoTypes, String minOfficialRating, Nullable`1 isLocked, Nullable`1 isPlaceHolder, Nullable`1 hasOfficialRating, Nullable`1 collapseBoxSetItems, Nullable`1 minWidth, Nullable`1 minHeight, Nullable`1 maxWidth, Nullable`1 maxHeight, Nullable`1 is3D, SeriesStatus[] seriesStatus, String nameStartsWithOrGreater, String nameStartsWith, String nameLessThan, Guid[] studioIds, Guid[] genreIds, Boolean enableTotalRecordCount, Nullable`1 enableImages) at lambda_method1336(Closure, Object, Object[]) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync() at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Jellyfin.Api.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager) at Jellyfin.Api.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager) at Jellyfin.Api.Middleware.IPBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager) at Jellyfin.Api.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Jellyfin.Api.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext) at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context) at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager) at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context) [2025-03-10 03:10:00.688 -07:00] [ERR] [23] Microsoft.EntityFrameworkCore.Update: An exception occurred in the database while saving changes for context type '"Jellyfin.Server.Implementations.JellyfinDbContext"'." ""Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'. at Microsoft.Data.Sqlite.SqliteDataRecord.Dispose() at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at System.Data.Common.DbDataReader.NextResultAsync(CancellationToken cancellationToken) --- End of stack trace from previous location --- at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)" Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'. at Microsoft.Data.Sqlite.SqliteDataRecord.Dispose() at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at System.Data.Common.DbDataReader.NextResultAsync(CancellationToken cancellationToken) --- End of stack trace from previous location --- at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device) at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device) at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString) at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString) at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfo(HttpRequest requestContext) at Emby.Server.Implementations.HttpServer.Security.AuthService.Authenticate(HttpRequest request) at Jellyfin.Api.Auth.CustomAuthenticationHandler.HandleAuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext) at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context) at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager) [2025-03-10 03:10:00.689 -07:00] [ERR] [23] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL "GET" "/Users/Me". Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'. at Microsoft.Data.Sqlite.SqliteDataRecord.Dispose() at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at System.Data.Common.DbDataReader.NextResultAsync(CancellationToken cancellationToken) --- End of stack trace from previous location --- at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device) at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device) at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString) at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString) at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfo(HttpRequest requestContext) at Emby.Server.Implementations.HttpServer.Security.AuthService.Authenticate(HttpRequest request) at Jellyfin.Api.Auth.CustomAuthenticationHandler.HandleAuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext) at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context) at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager) at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context) ///////////// Snippet from debug logs, notably there are a ton of MediaSegments DB commands ""SELECT EXISTS ( SELECT 1 FROM \"MediaSegments\" AS \"m\" WHERE \"m\".\"ItemId\" = @__itemId_0)" [2025-03-09 08:55:05.353 -07:00] [INF] [86] Microsoft.EntityFrameworkCore.Database.Command: Executed DbCommand ("148"ms) [Parameters=["@__itemId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" ""SELECT EXISTS ( SELECT 1 FROM \"MediaSegments\" AS \"m\" WHERE \"m\".\"ItemId\" = @__itemId_0)" [2025-03-09 08:55:05.392 -07:00] [INF] [87] Microsoft.EntityFrameworkCore.Database.Command: Executed DbCommand ("185"ms) [Parameters=["@__itemId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" ""SELECT EXISTS ( SELECT 1 FROM \"MediaSegments\" AS \"m\" WHERE \"m\".\"ItemId\" = @__itemId_0)" [2025-03-09 08:55:05.457 -07:00] [INF] [31] Microsoft.EntityFrameworkCore.Database.Command: Executed DbCommand ("266"ms) [Parameters=["@__itemId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" ""SELECT EXISTS ( SELECT 1 FROM \"MediaSegments\" AS \"m\" WHERE \"m\".\"ItemId\" = @__itemId_0)" [2025-03-09 08:55:05.509 -07:00] [INF] [42] Microsoft.EntityFrameworkCore.Database.Command: Executed DbCommand ("317"ms) [Parameters=["@__itemId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" ""SELECT EXISTS ( SELECT 1 FROM \"MediaSegments\" AS \"m\" WHERE \"m\".\"ItemId\" = @__itemId_0)" [2025-03-09 08:55:05.551 -07:00] [INF] [11] Microsoft.EntityFrameworkCore.Database.Command: Executed DbCommand ("351"ms) [Parameters=["@__itemId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" ""SELECT EXISTS ( SELECT 1 FROM \"MediaSegments\" AS \"m\" WHERE \"m\".\"ItemId\" = @__itemId_0)" [2025-03-09 08:55:05.614 -07:00] [INF] [89] Microsoft.EntityFrameworkCore.Database.Command: Executed DbCommand ("413"ms) [Parameters=["@__itemId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" ""SELECT EXISTS ( SELECT 1 FROM \"MediaSegments\" AS \"m\" WHERE \"m\".\"ItemId\" = @__itemId_0)" [2025-03-09 08:55:05.659 -07:00] [INF] [62] Microsoft.EntityFrameworkCore.Database.Command: Executed DbCommand ("454"ms) [Parameters=["@__itemId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" ""SELECT EXISTS ( SELECT 1 FROM \"MediaSegments\" AS \"m\" WHERE \"m\".\"ItemId\" = @__itemId_0)" [2025-03-09 08:55:05.703 -07:00] [INF] [71] Microsoft.EntityFrameworkCore.Database.Command: Executed DbCommand ("469"ms) [Parameters=["@__itemId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" ""SELECT EXISTS ( SELECT 1 FROM \"MediaSegments\" AS \"m\" WHERE \"m\".\"ItemId\" = @__itemId_0)" [2025-03-09 08:55:05.747 -07:00] [INF] [3] Microsoft.AspNetCore.Hosting.Diagnostics: Request starting "HTTP/1.1" "GET" "http"://"jellyfin.redacted""""/sessions""" - null null [2025-03-09 08:55:05.747 -07:00] [INF] [3] Microsoft.EntityFrameworkCore.Database.Command: Executed DbCommand ("0"ms) [Parameters=["@__token_0='?' (Size = 32)"], CommandType='Text', CommandTimeout='30']" ""SELECT \"a\".\"Id\", \"a\".\"AccessToken\", \"a\".\"DateCreated\", \"a\".\"DateLastActivity\", \"a\".\"Name\" FROM \"ApiKeys\" AS \"a\" WHERE \"a\".\"AccessToken\" = @__token_0 LIMIT 1" [2025-03-09 08:55:05.747 -07:00] [INF] [3] Microsoft.AspNetCore.Routing.EndpointMiddleware: Executing endpoint '"Jellyfin.Api.Controllers.SessionController.GetSessions (Jellyfin.Api)"' [2025-03-09 08:55:05.747 -07:00] [INF] [3] Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Route matched with "{action = \"GetSessions\", controller = \"Session\"}". Executing controller action with signature "Microsoft.AspNetCore.Mvc.ActionResult`1[System.Collections.Generic.IReadOnlyList`1[MediaBrowser.Model.Dto.SessionInfoDto]] GetSessions(System.Nullable`1[System.Guid], System.String, System.Nullable`1[System.Int32])" on controller "Jellyfin.Api.Controllers.SessionController" ("Jellyfin.Api"). [2025-03-09 08:55:05.747 -07:00] [INF] [3] Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor: Executing "OkResult`1", writing value of type '"System.Collections.Generic.List`1[[MediaBrowser.Model.Dto.SessionInfoDto, MediaBrowser.Model, Version=10.10.6.0, Culture=neutral, PublicKeyToken=null]]"'. [2025-03-09 08:55:05.748 -07:00] [INF] [3] Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Executed action "Jellyfin.Api.Controllers.SessionController.GetSessions (Jellyfin.Api)" in 0.9478ms [2025-03-09 08:55:05.748 -07:00] [INF] [3] Microsoft.AspNetCore.Routing.EndpointMiddleware: Executed endpoint '"Jellyfin.Api.Controllers.SessionController.GetSessions (Jellyfin.Api)"' [2025-03-09 08:55:05.748 -07:00] [INF] [3] Microsoft.AspNetCore.Hosting.Diagnostics: Request finished "HTTP/1.1" "GET" "https"://"jellyfin.redacted""""/sessions""" - 200 null "application/json; charset=utf-8" 1.764ms [2025-03-09 08:55:05.764 -07:00] [INF] [31] Microsoft.EntityFrameworkCore.Database.Command: Executed DbCommand ("102"ms) [Parameters=["@__itemId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" ""SELECT EXISTS ( SELECT 1 FROM \"MediaSegments\" AS \"m\" WHERE \"m\".\"ItemId\" = @__itemId_0)" [2025-03-09 08:55:05.764 -07:00] [INF] [45] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Processing playback tracker : "ef732e332cbbbc1639700a22ed29f0da2c2c8fa0-bf163c66607f4e6f9095fac3c0e672af-e39153a6b99fd6dd6ad8795c5adcade8" [2025-03-09 08:55:05.768 -07:00] [INF] [3] Microsoft.AspNetCore.Hosting.Diagnostics: Request starting "HTTP/1.1" "POST" "http"://"192.168.69.245:8096""""/Sessions/Playing/Progress""" - "application/json" 349 [2025-03-09 08:55:05.768 -07:00] [INF] [3] Microsoft.EntityFrameworkCore.Database.Command: Executed DbCommand ("1"ms) [Parameters=["@p10='?' (DbType = Int32), @p0='?' (Size = 32), @p1='?' (Size = 10), @p2='?' (Size = 6), @p3='?' (DbType = DateTime), @p4='?' (DbType = DateTime), @p5='?' (DbType = DateTime), @p6='?' (Size = 40), @p7='?' (Size = 6), @p8='?' (DbType = Boolean), @p9='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" ""UPDATE \"Devices\" SET \"AccessToken\" = @p0, \"AppName\" = @p1, \"AppVersion\" = @p2, \"DateCreated\" = @p3, \"DateLastActivity\" = @p4, \"DateModified\" = @p5, \"DeviceId\" = @p6, \"DeviceName\" = @p7, \"IsActive\" = @p8, \"UserId\" = @p9 WHERE \"Id\" = @p10 RETURNING 1;" [2025-03-09 08:55:05.770 -07:00] [ERR] [3] Microsoft.EntityFrameworkCore.Update: An exception occurred in the database while saving changes for context type '"Jellyfin.Server.Implementations.JellyfinDbContext"'." ""Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'. at Microsoft.Data.Sqlite.SqliteDataRecord.Dispose() at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at System.Data.Common.DbDataReader.NextResultAsync(CancellationToken cancellationToken) --- End of stack trace from previous location --- at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)" Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'. at Microsoft.Data.Sqlite.SqliteDataRecord.Dispose() at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at System.Data.Common.DbDataReader.NextResultAsync(CancellationToken cancellationToken) --- End of stack trace from previous location --- at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device) at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device) at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString) at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString) at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfo(HttpRequest requestContext) at Emby.Server.Implementations.HttpServer.Security.AuthService.Authenticate(HttpRequest request) [2025-03-09 08:55:05.770 -07:00] [ERR] [3] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL "POST" "/Sessions/Playing/Progress". Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'. at Microsoft.Data.Sqlite.SqliteDataRecord.Dispose() at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at System.Data.Common.DbDataReader.NextResultAsync(CancellationToken cancellationToken) --- End of stack trace from previous location --- at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device) at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device) at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString) at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString) at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfo(HttpRequest requestContext) at Emby.Server.Implementations.HttpServer.Security.AuthService.Authenticate(HttpRequest request) at Jellyfin.Api.Auth.CustomAuthenticationHandler.HandleAuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext) at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context) at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager) at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context) [2025-03-09 08:55:05.771 -07:00] [INF] [3] Microsoft.AspNetCore.Hosting.Diagnostics: Request finished "HTTP/1.1" "POST" "http"://"192.168.69.245:8096""""/Sessions/Playing/Progress""" - 500 null "text/plain" 3.3869ms [2025-03-09 08:55:05.800 -07:00] [INF] [62] Microsoft.EntityFrameworkCore.Database.Command: Executed DbCommand ("137"ms) [Parameters=["@__itemId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" ``` ### FFmpeg logs ```shell ``` ### Client / Browser logs _No response_ ### Relevant screenshots or videos _No response_ ### Additional information I tried setting JELLYFIN_SQLITE__disableSecondLevelCache=true, changed parallel encoding and library scan instances to 1, as well as set trickplay threads to 1. Also tried allocating fewer cores to the container. I am not sure what causes this behavior. There are lots of MediaSegment DB commands as seen in the debug logs, and throughout the debug logs the DB response time can be as high as 10,000ms. This seems incredibly slow on an SSD. I am not sure if the slow DB is caused by Jellyfin having some other error, or if the DB being overwhelmed is causing the unresponsiveness. System specs: CPU: 64 core Epyc 7702 RAM: 512GB Storage: RAID 1 WD Ultrastar DC SN200 3.2TB PCIe SSDs
OVERLORD added the bug label 2026-02-07 04:09:00 +03:00
Author
Owner

@felix920506 commented on GitHub (Mar 11, 2025):

Please remove playback reporting plugin and see if issue persists.

@felix920506 commented on GitHub (Mar 11, 2025): Please remove playback reporting plugin and see if issue persists.
Author
Owner

@SLemons13 commented on GitHub (Mar 11, 2025):

Oh it seems that was it. The webui in general is 5x faster now without playback reporting. The log still has a database lock error every few minutes, though no performance issues coupled with them. Is these errors normal and data is written when the DB unlocks?

@SLemons13 commented on GitHub (Mar 11, 2025): Oh it seems that was it. The webui in general is 5x faster now without playback reporting. The log still has a database lock error every few minutes, though no performance issues coupled with them. Is these errors normal and data is written when the DB unlocks?
Author
Owner

@SLemons13 commented on GitHub (Mar 13, 2025):

The issue still persists without the playback reporting plugin. Memory and CPU usage had spiked around 9pm when JF became unresponsive. It had the CPU cores allocated pinned at 100%. That time coincides with when I set a task for Trickplay generation to start. Not sure if that is related. Memory usage seems to hit 12GB every time this happens. Here is the log

log_20250312.log

@SLemons13 commented on GitHub (Mar 13, 2025): The issue still persists without the playback reporting plugin. Memory and CPU usage had spiked around 9pm when JF became unresponsive. It had the CPU cores allocated pinned at 100%. That time coincides with when I set a task for Trickplay generation to start. Not sure if that is related. Memory usage seems to hit 12GB every time this happens. Here is the log [log_20250312.log](https://github.com/user-attachments/files/19221970/log_20250312.log)
Author
Owner

@SLemons13 commented on GitHub (Mar 13, 2025):

Happened again. Got the debug logs along with memory usage. The debug logs start at 05:20:12.634.

log_20250313.log

Image
@SLemons13 commented on GitHub (Mar 13, 2025): Happened again. Got the debug logs along with memory usage. The debug logs start at 05:20:12.634. [log_20250313.log](https://github.com/user-attachments/files/19229266/log_20250313.log) <img width="1493" alt="Image" src="https://github.com/user-attachments/assets/dfe93cba-cb51-4d8f-bbf7-b8e93bb570c3" />
Author
Owner

@telnetdoogie commented on GitHub (Mar 29, 2025):

@SLemons13 I recently moved some containers into a VM and was mounting the folders for docker via NFS. I saw a LOT of this behavior with SQLite DBs in my docker containers and apparently DB locks and problems are pretty typical in SQLite when the file is not on a local physical device. Do you happen to be accessing the jellyfin data folder over the network (SMB / NFS share)?

I just moved my *arr stacks over to postgres DBs and it has resolved the issue so SQLite DBs over a shared folder is definitely a contributor for similar behavior...

What's the physical location of your volumes in relation to where you're running the container?

@telnetdoogie commented on GitHub (Mar 29, 2025): @SLemons13 I recently moved some containers into a VM and was mounting the folders for docker via NFS. I saw a LOT of this behavior with SQLite DBs in my docker containers and apparently DB locks and problems are pretty typical in SQLite when the file is not on a local physical device. Do you happen to be accessing the jellyfin data folder over the network (SMB / NFS share)? I just moved my *arr stacks over to postgres DBs and it has resolved the issue so SQLite DBs over a shared folder is definitely a contributor for similar behavior... What's the physical location of your volumes in relation to where you're running the container?
Author
Owner

@SLemons13 commented on GitHub (Mar 29, 2025):

@telnetdoogie All data and metadata local on a pair of mirrored SSDs. No VMs in this use case, just bare metal TrueNAS and running docker from that.

@SLemons13 commented on GitHub (Mar 29, 2025): @telnetdoogie All data and metadata local on a pair of mirrored SSDs. No VMs in this use case, just bare metal TrueNAS and running docker from that.
Author
Owner

@SLemons13 commented on GitHub (Apr 2, 2025):

I could have attributed this issue to the wrong cause. This one occurred during a library scan. possibly related to #13708. I copied my data over to an instance running tag 2025021706 and it has been completely stable with way less memory usage. Always hovering around ~750mb.

log_20250401.log

@SLemons13 commented on GitHub (Apr 2, 2025): I could have attributed this issue to the wrong cause. This one occurred during a library scan. possibly related to #13708. I copied my data over to an instance running tag 2025021706 and it has been completely stable with way less memory usage. Always hovering around ~750mb. [log_20250401.log](https://github.com/user-attachments/files/19565041/log_20250401.log)
Author
Owner

@kambala-decapitator commented on GitHub (Apr 23, 2025):

from time to time I've started observing the media player (I use dedicated app on macOS) taking like a couple of minutes to advance to next song. Today I checked logs when it occurred again and also noticed database is locked. I think it started after upgrading to v10.10.x (currently running v10.10.5 on Debian 11), don't remember having any issues on v10.9.x.

Click to expand log
[2025-04-23 17:20:54.747 +03:00] [INF] Playback stopped reported by app "Jellyfin Media Player" "1.12.0" playing "The Flood". Stopped at "0" ms
[2025-04-23 17:20:54.822 +03:00] [INF] Playback stopped reported by app "Jellyfin Media Player" "1.12.0" playing "The Flood". Stopped at "236535" ms
[2025-04-23 17:20:55.003 +03:00] [INF] User policy for "kambala". EnableAudioPlaybackTranscoding: True
[2025-04-23 17:23:10.089 +03:00] [INF] "Media Segment Scan" Completed after 0 minute(s) and 55 seconds
[2025-04-23 17:25:04.595 +03:00] [INF] Playback stopped reported by app "Jellyfin Media Player" "1.12.0" playing "How Long". Stopped at "249143" ms
[2025-04-23 17:25:04.606 +03:00] [INF] Playback stopped reported by app "Jellyfin Media Player" "1.12.0" playing "How Long". Stopped at "0" ms
[2025-04-23 17:25:04.804 +03:00] [INF] User policy for "kambala". EnableAudioPlaybackTranscoding: True
[2025-04-23 17:25:17.797 +03:00] [ERR] An error occurred using the connection to database '"main"' on server '"/var/lib/jellyfin/data/jellyfin.db"'.
[2025-04-23 17:25:18.268 +03:00] [ERR] An exception occurred while iterating over the results of a query for context type '"Jellyfin.Server.Implementations.JellyfinDbContext"'."
""Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked For more information on this error code see https://www.sqlite.org/rescode.html'.
   at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
   at Microsoft.Data.Sqlite.SqliteConnection.Open()
   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternal(Boolean errorsExpected)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.InitializeReader(Enumerator enumerator)
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext()"
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked For more information on this error code see https://www.sqlite.org/rescode.html'.
   at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
   at Microsoft.Data.Sqlite.SqliteConnection.Open()
   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternal(Boolean errorsExpected)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.InitializeReader(Enumerator enumerator)
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext()
   at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Boolean& found)
   at lambda_method1135(Closure, QueryContext)
   at Jellyfin.Server.Implementations.MediaSegments.MediaSegmentManager.HasSegments(Guid itemId)
   at MediaBrowser.Controller.Entities.BaseItem.GetVersionInfo(Boolean enablePathSubstitution, BaseItem item, MediaSourceType type)
   at System.Linq.Enumerable.SelectArrayIterator`2.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func)
   at System.Linq.Enumerable.SelectArrayIterator`2.ToList()
   at MediaBrowser.Controller.Entities.BaseItem.GetMediaSources(Boolean enablePathSubstitution)
   at Emby.Server.Implementations.Library.MediaSourceManager.GetStaticMediaSources(BaseItem item, Boolean enablePathSubstitution, User user)
   at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtoInternal(BaseItem item, DtoOptions options, User user, BaseItem owner)
   at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtos(IReadOnlyList`1 items, DtoOptions options, User user, BaseItem owner)
   at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime)
   at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
   at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2025-04-23 17:25:18.293 +03:00] [ERR] Error reporting playback progress
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked For more information on this error code see https://www.sqlite.org/rescode.html'.
   at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
   at Microsoft.Data.Sqlite.SqliteConnection.Open()
   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternal(Boolean errorsExpected)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.InitializeReader(Enumerator enumerator)
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext()
   at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Boolean& found)
   at lambda_method1135(Closure, QueryContext)
   at Jellyfin.Server.Implementations.MediaSegments.MediaSegmentManager.HasSegments(Guid itemId)
   at MediaBrowser.Controller.Entities.BaseItem.GetVersionInfo(Boolean enablePathSubstitution, BaseItem item, MediaSourceType type)
   at System.Linq.Enumerable.SelectArrayIterator`2.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func)
   at System.Linq.Enumerable.SelectArrayIterator`2.ToList()
   at MediaBrowser.Controller.Entities.BaseItem.GetMediaSources(Boolean enablePathSubstitution)
   at Emby.Server.Implementations.Library.MediaSourceManager.GetStaticMediaSources(BaseItem item, Boolean enablePathSubstitution, User user)
   at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtoInternal(BaseItem item, DtoOptions options, User user, BaseItem owner)
   at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtos(IReadOnlyList`1 items, DtoOptions options, User user, BaseItem owner)
   at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime)
   at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
   at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2025-04-23 17:25:22.670 +03:00] [ERR] An error occurred using the connection to database '"main"' on server '"/var/lib/jellyfin/data/jellyfin.db"'.
[2025-04-23 17:25:22.672 +03:00] [ERR] An exception occurred while iterating over the results of a query for context type '"Jellyfin.Server.Implementations.JellyfinDbContext"'."
""Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'unable to delete/modify user-function due to active statements'.
   at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
   at Microsoft.Data.Sqlite.SqliteConnection.Open()
   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternal(Boolean errorsExpected)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.InitializeReader(Enumerator enumerator)
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext()"
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'unable to delete/modify user-function due to active statements'.
   at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
   at Microsoft.Data.Sqlite.SqliteConnection.Open()
   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternal(Boolean errorsExpected)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.InitializeReader(Enumerator enumerator)
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext()
   at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Boolean& found)
   at lambda_method1135(Closure, QueryContext)
   at Jellyfin.Server.Implementations.MediaSegments.MediaSegmentManager.HasSegments(Guid itemId)
   at MediaBrowser.Controller.Entities.BaseItem.GetVersionInfo(Boolean enablePathSubstitution, BaseItem item, MediaSourceType type)
   at System.Linq.Enumerable.SelectArrayIterator`2.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func)
   at System.Linq.Enumerable.SelectArrayIterator`2.ToList()
   at MediaBrowser.Controller.Entities.BaseItem.GetMediaSources(Boolean enablePathSubstitution)
   at Emby.Server.Implementations.Library.MediaSourceManager.GetStaticMediaSources(BaseItem item, Boolean enablePathSubstitution, User user)
   at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtoInternal(BaseItem item, DtoOptions options, User user, BaseItem owner)
   at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtos(IReadOnlyList`1 items, DtoOptions options, User user, BaseItem owner)
   at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime)
   at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
   at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2025-04-23 17:25:22.687 +03:00] [ERR] Error reporting playback progress
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'unable to delete/modify user-function due to active statements'.
   at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
   at Microsoft.Data.Sqlite.SqliteConnection.Open()
   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternal(Boolean errorsExpected)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.InitializeReader(Enumerator enumerator)
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext()
   at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Boolean& found)
   at lambda_method1135(Closure, QueryContext)
   at Jellyfin.Server.Implementations.MediaSegments.MediaSegmentManager.HasSegments(Guid itemId)
   at MediaBrowser.Controller.Entities.BaseItem.GetVersionInfo(Boolean enablePathSubstitution, BaseItem item, MediaSourceType type)
   at System.Linq.Enumerable.SelectArrayIterator`2.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func)
   at System.Linq.Enumerable.SelectArrayIterator`2.ToList()
   at MediaBrowser.Controller.Entities.BaseItem.GetMediaSources(Boolean enablePathSubstitution)
   at Emby.Server.Implementations.Library.MediaSourceManager.GetStaticMediaSources(BaseItem item, Boolean enablePathSubstitution, User user)
   at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtoInternal(BaseItem item, DtoOptions options, User user, BaseItem owner)
   at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtos(IReadOnlyList`1 items, DtoOptions options, User user, BaseItem owner)
   at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime)
   at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
   at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2025-04-23 17:25:24.158 +03:00] [ERR] An error occurred using the connection to database '"main"' on server '"/var/lib/jellyfin/data/jellyfin.db"'.
[2025-04-23 17:25:24.180 +03:00] [ERR] An exception occurred while iterating over the results of a query for context type '"Jellyfin.Server.Implementations.JellyfinDbContext"'."
""Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'unable to delete/modify user-function due to active statements'.
   at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
   at Microsoft.Data.Sqlite.SqliteConnection.Deactivate()
   at Microsoft.Data.Sqlite.SqliteConnectionInternal.Close()
   at Microsoft.Data.Sqlite.SqliteConnection.Open()
   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternal(Boolean errorsExpected)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.InitializeReader(Enumerator enumerator)
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext()"
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'unable to delete/modify user-function due to active statements'.
   at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
   at Microsoft.Data.Sqlite.SqliteConnection.Deactivate()
   at Microsoft.Data.Sqlite.SqliteConnectionInternal.Close()
   at Microsoft.Data.Sqlite.SqliteConnection.Open()
   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternal(Boolean errorsExpected)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.InitializeReader(Enumerator enumerator)
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext()
   at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Boolean& found)
   at lambda_method1135(Closure, QueryContext)
   at Jellyfin.Server.Implementations.MediaSegments.MediaSegmentManager.HasSegments(Guid itemId)
   at MediaBrowser.Controller.Entities.BaseItem.GetVersionInfo(Boolean enablePathSubstitution, BaseItem item, MediaSourceType type)
   at System.Linq.Enumerable.SelectArrayIterator`2.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func)
   at System.Linq.Enumerable.SelectArrayIterator`2.ToList()
   at MediaBrowser.Controller.Entities.BaseItem.GetMediaSources(Boolean enablePathSubstitution)
   at Emby.Server.Implementations.Library.MediaSourceManager.GetStaticMediaSources(BaseItem item, Boolean enablePathSubstitution, User user)
   at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtoInternal(BaseItem item, DtoOptions options, User user, BaseItem owner)
   at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtos(IReadOnlyList`1 items, DtoOptions options, User user, BaseItem owner)
   at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime)
[2025-04-23 17:25:24.484 +03:00] [ERR] Error reporting playback progress
System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.Data.Sqlite.SqliteConnection.Deactivate()
   at Microsoft.Data.Sqlite.SqliteConnection.Close()
   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.ResetState(Boolean disposeDbConnection)
   at Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Infrastructure.IResettableService.ResetState()
   at Jellyfin.Server.Implementations.MediaSegments.MediaSegmentManager.HasSegments(Guid itemId)
   at MediaBrowser.Controller.Entities.BaseItem.GetVersionInfo(Boolean enablePathSubstitution, BaseItem item, MediaSourceType type)
   at System.Linq.Enumerable.SelectArrayIterator`2.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func)
   at System.Linq.Enumerable.SelectArrayIterator`2.ToList()
   at MediaBrowser.Controller.Entities.BaseItem.GetMediaSources(Boolean enablePathSubstitution)
   at Emby.Server.Implementations.Library.MediaSourceManager.GetStaticMediaSources(BaseItem item, Boolean enablePathSubstitution, User user)
   at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtoInternal(BaseItem item, DtoOptions options, User user, BaseItem owner)
   at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtos(IReadOnlyList`1 items, DtoOptions options, User user, BaseItem owner)
   at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime)
   at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
   at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2025-04-23 17:34:30.839 +03:00] [INF] Playback stopped reported by app "Jellyfin Media Player" "1.12.0" playing "Taking Over Me (Live In Paris)". Stopped at "0" ms
[2025-04-23 17:34:31.116 +03:00] [INF] Playback stopped reported by app "Jellyfin Media Player" "1.12.0" playing "Taking Over Me (Live In Paris)". Stopped at "239285" ms
[2025-04-23 17:34:31.450 +03:00] [INF] User policy for "kambala". EnableAudioPlaybackTranscoding: True
[2025-04-23 17:35:22.494 +03:00] [ERR] Object Disposed
System.ObjectDisposedException: The CancellationTokenSource has been disposed.
   at System.Threading.CancellationTokenSource.Cancel()
   at MediaBrowser.Controller.Net.BasePeriodicWebSocketListener`2.DisposeConnection(ValueTuple`3 connection)
@kambala-decapitator commented on GitHub (Apr 23, 2025): from time to time I've started observing the media player (I use dedicated app on macOS) taking like a couple of minutes to advance to next song. Today I checked logs when it occurred again and also noticed `database is locked`. I think it started after upgrading to v10.10.x (currently running v10.10.5 on Debian 11), don't remember having any issues on v10.9.x. <details><summary>Click to expand log</summary> ``` [2025-04-23 17:20:54.747 +03:00] [INF] Playback stopped reported by app "Jellyfin Media Player" "1.12.0" playing "The Flood". Stopped at "0" ms [2025-04-23 17:20:54.822 +03:00] [INF] Playback stopped reported by app "Jellyfin Media Player" "1.12.0" playing "The Flood". Stopped at "236535" ms [2025-04-23 17:20:55.003 +03:00] [INF] User policy for "kambala". EnableAudioPlaybackTranscoding: True [2025-04-23 17:23:10.089 +03:00] [INF] "Media Segment Scan" Completed after 0 minute(s) and 55 seconds [2025-04-23 17:25:04.595 +03:00] [INF] Playback stopped reported by app "Jellyfin Media Player" "1.12.0" playing "How Long". Stopped at "249143" ms [2025-04-23 17:25:04.606 +03:00] [INF] Playback stopped reported by app "Jellyfin Media Player" "1.12.0" playing "How Long". Stopped at "0" ms [2025-04-23 17:25:04.804 +03:00] [INF] User policy for "kambala". EnableAudioPlaybackTranscoding: True [2025-04-23 17:25:17.797 +03:00] [ERR] An error occurred using the connection to database '"main"' on server '"/var/lib/jellyfin/data/jellyfin.db"'. [2025-04-23 17:25:18.268 +03:00] [ERR] An exception occurred while iterating over the results of a query for context type '"Jellyfin.Server.Implementations.JellyfinDbContext"'." ""Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked For more information on this error code see https://www.sqlite.org/rescode.html'. at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) at Microsoft.Data.Sqlite.SqliteConnection.Open() at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternal(Boolean errorsExpected) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.InitializeReader(Enumerator enumerator) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext()" Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked For more information on this error code see https://www.sqlite.org/rescode.html'. at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) at Microsoft.Data.Sqlite.SqliteConnection.Open() at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternal(Boolean errorsExpected) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.InitializeReader(Enumerator enumerator) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext() at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Boolean& found) at lambda_method1135(Closure, QueryContext) at Jellyfin.Server.Implementations.MediaSegments.MediaSegmentManager.HasSegments(Guid itemId) at MediaBrowser.Controller.Entities.BaseItem.GetVersionInfo(Boolean enablePathSubstitution, BaseItem item, MediaSourceType type) at System.Linq.Enumerable.SelectArrayIterator`2.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func) at System.Linq.Enumerable.SelectArrayIterator`2.ToList() at MediaBrowser.Controller.Entities.BaseItem.GetMediaSources(Boolean enablePathSubstitution) at Emby.Server.Implementations.Library.MediaSourceManager.GetStaticMediaSources(BaseItem item, Boolean enablePathSubstitution, User user) at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtoInternal(BaseItem item, DtoOptions options, User user, BaseItem owner) at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtos(IReadOnlyList`1 items, DtoOptions options, User user, BaseItem owner) at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime) at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated) at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state) [2025-04-23 17:25:18.293 +03:00] [ERR] Error reporting playback progress Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked For more information on this error code see https://www.sqlite.org/rescode.html'. at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) at Microsoft.Data.Sqlite.SqliteConnection.Open() at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternal(Boolean errorsExpected) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.InitializeReader(Enumerator enumerator) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext() at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Boolean& found) at lambda_method1135(Closure, QueryContext) at Jellyfin.Server.Implementations.MediaSegments.MediaSegmentManager.HasSegments(Guid itemId) at MediaBrowser.Controller.Entities.BaseItem.GetVersionInfo(Boolean enablePathSubstitution, BaseItem item, MediaSourceType type) at System.Linq.Enumerable.SelectArrayIterator`2.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func) at System.Linq.Enumerable.SelectArrayIterator`2.ToList() at MediaBrowser.Controller.Entities.BaseItem.GetMediaSources(Boolean enablePathSubstitution) at Emby.Server.Implementations.Library.MediaSourceManager.GetStaticMediaSources(BaseItem item, Boolean enablePathSubstitution, User user) at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtoInternal(BaseItem item, DtoOptions options, User user, BaseItem owner) at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtos(IReadOnlyList`1 items, DtoOptions options, User user, BaseItem owner) at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime) at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated) at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state) [2025-04-23 17:25:22.670 +03:00] [ERR] An error occurred using the connection to database '"main"' on server '"/var/lib/jellyfin/data/jellyfin.db"'. [2025-04-23 17:25:22.672 +03:00] [ERR] An exception occurred while iterating over the results of a query for context type '"Jellyfin.Server.Implementations.JellyfinDbContext"'." ""Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'unable to delete/modify user-function due to active statements'. at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) at Microsoft.Data.Sqlite.SqliteConnection.Open() at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternal(Boolean errorsExpected) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.InitializeReader(Enumerator enumerator) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext()" Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'unable to delete/modify user-function due to active statements'. at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) at Microsoft.Data.Sqlite.SqliteConnection.Open() at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternal(Boolean errorsExpected) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.InitializeReader(Enumerator enumerator) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext() at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Boolean& found) at lambda_method1135(Closure, QueryContext) at Jellyfin.Server.Implementations.MediaSegments.MediaSegmentManager.HasSegments(Guid itemId) at MediaBrowser.Controller.Entities.BaseItem.GetVersionInfo(Boolean enablePathSubstitution, BaseItem item, MediaSourceType type) at System.Linq.Enumerable.SelectArrayIterator`2.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func) at System.Linq.Enumerable.SelectArrayIterator`2.ToList() at MediaBrowser.Controller.Entities.BaseItem.GetMediaSources(Boolean enablePathSubstitution) at Emby.Server.Implementations.Library.MediaSourceManager.GetStaticMediaSources(BaseItem item, Boolean enablePathSubstitution, User user) at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtoInternal(BaseItem item, DtoOptions options, User user, BaseItem owner) at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtos(IReadOnlyList`1 items, DtoOptions options, User user, BaseItem owner) at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime) at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated) at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state) [2025-04-23 17:25:22.687 +03:00] [ERR] Error reporting playback progress Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'unable to delete/modify user-function due to active statements'. at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) at Microsoft.Data.Sqlite.SqliteConnection.Open() at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternal(Boolean errorsExpected) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.InitializeReader(Enumerator enumerator) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext() at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Boolean& found) at lambda_method1135(Closure, QueryContext) at Jellyfin.Server.Implementations.MediaSegments.MediaSegmentManager.HasSegments(Guid itemId) at MediaBrowser.Controller.Entities.BaseItem.GetVersionInfo(Boolean enablePathSubstitution, BaseItem item, MediaSourceType type) at System.Linq.Enumerable.SelectArrayIterator`2.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func) at System.Linq.Enumerable.SelectArrayIterator`2.ToList() at MediaBrowser.Controller.Entities.BaseItem.GetMediaSources(Boolean enablePathSubstitution) at Emby.Server.Implementations.Library.MediaSourceManager.GetStaticMediaSources(BaseItem item, Boolean enablePathSubstitution, User user) at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtoInternal(BaseItem item, DtoOptions options, User user, BaseItem owner) at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtos(IReadOnlyList`1 items, DtoOptions options, User user, BaseItem owner) at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime) at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated) at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state) [2025-04-23 17:25:24.158 +03:00] [ERR] An error occurred using the connection to database '"main"' on server '"/var/lib/jellyfin/data/jellyfin.db"'. [2025-04-23 17:25:24.180 +03:00] [ERR] An exception occurred while iterating over the results of a query for context type '"Jellyfin.Server.Implementations.JellyfinDbContext"'." ""Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'unable to delete/modify user-function due to active statements'. at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) at Microsoft.Data.Sqlite.SqliteConnection.Deactivate() at Microsoft.Data.Sqlite.SqliteConnectionInternal.Close() at Microsoft.Data.Sqlite.SqliteConnection.Open() at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternal(Boolean errorsExpected) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.InitializeReader(Enumerator enumerator) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext()" Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'unable to delete/modify user-function due to active statements'. at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) at Microsoft.Data.Sqlite.SqliteConnection.Deactivate() at Microsoft.Data.Sqlite.SqliteConnectionInternal.Close() at Microsoft.Data.Sqlite.SqliteConnection.Open() at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternal(Boolean errorsExpected) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.InitializeReader(Enumerator enumerator) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext() at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Boolean& found) at lambda_method1135(Closure, QueryContext) at Jellyfin.Server.Implementations.MediaSegments.MediaSegmentManager.HasSegments(Guid itemId) at MediaBrowser.Controller.Entities.BaseItem.GetVersionInfo(Boolean enablePathSubstitution, BaseItem item, MediaSourceType type) at System.Linq.Enumerable.SelectArrayIterator`2.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func) at System.Linq.Enumerable.SelectArrayIterator`2.ToList() at MediaBrowser.Controller.Entities.BaseItem.GetMediaSources(Boolean enablePathSubstitution) at Emby.Server.Implementations.Library.MediaSourceManager.GetStaticMediaSources(BaseItem item, Boolean enablePathSubstitution, User user) at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtoInternal(BaseItem item, DtoOptions options, User user, BaseItem owner) at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtos(IReadOnlyList`1 items, DtoOptions options, User user, BaseItem owner) at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime) [2025-04-23 17:25:24.484 +03:00] [ERR] Error reporting playback progress System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Data.Sqlite.SqliteConnection.Deactivate() at Microsoft.Data.Sqlite.SqliteConnection.Close() at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.ResetState(Boolean disposeDbConnection) at Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Infrastructure.IResettableService.ResetState() at Jellyfin.Server.Implementations.MediaSegments.MediaSegmentManager.HasSegments(Guid itemId) at MediaBrowser.Controller.Entities.BaseItem.GetVersionInfo(Boolean enablePathSubstitution, BaseItem item, MediaSourceType type) at System.Linq.Enumerable.SelectArrayIterator`2.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func) at System.Linq.Enumerable.SelectArrayIterator`2.ToList() at MediaBrowser.Controller.Entities.BaseItem.GetMediaSources(Boolean enablePathSubstitution) at Emby.Server.Implementations.Library.MediaSourceManager.GetStaticMediaSources(BaseItem item, Boolean enablePathSubstitution, User user) at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtoInternal(BaseItem item, DtoOptions options, User user, BaseItem owner) at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtos(IReadOnlyList`1 items, DtoOptions options, User user, BaseItem owner) at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime) at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated) at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state) [2025-04-23 17:34:30.839 +03:00] [INF] Playback stopped reported by app "Jellyfin Media Player" "1.12.0" playing "Taking Over Me (Live In Paris)". Stopped at "0" ms [2025-04-23 17:34:31.116 +03:00] [INF] Playback stopped reported by app "Jellyfin Media Player" "1.12.0" playing "Taking Over Me (Live In Paris)". Stopped at "239285" ms [2025-04-23 17:34:31.450 +03:00] [INF] User policy for "kambala". EnableAudioPlaybackTranscoding: True [2025-04-23 17:35:22.494 +03:00] [ERR] Object Disposed System.ObjectDisposedException: The CancellationTokenSource has been disposed. at System.Threading.CancellationTokenSource.Cancel() at MediaBrowser.Controller.Net.BasePeriodicWebSocketListener`2.DisposeConnection(ValueTuple`3 connection) ``` </details>
Author
Owner

@JPVenson commented on GitHub (Apr 24, 2025):

Do you run any script that modfies the permissions on the jellyfin directory?

@JPVenson commented on GitHub (Apr 24, 2025): Do you run any script that modfies the permissions on the jellyfin directory?
Author
Owner

@kambala-decapitator commented on GitHub (Apr 24, 2025):

Do you run any script that modfies the permissions on the jellyfin directory?

I don't

@kambala-decapitator commented on GitHub (Apr 24, 2025): > Do you run any script that modfies the permissions on the jellyfin directory? I don't
Author
Owner

@JPVenson commented on GitHub (Apr 24, 2025):

your config folder is located on a local device not on a network share?

@JPVenson commented on GitHub (Apr 24, 2025): your config folder is located on a local device not on a network share?
Author
Owner

@gnattu commented on GitHub (Apr 24, 2025):

I think we have to bring back the old write connection lock to EFCore, at least for the SQLite backend. So that all operations that will write to the database has to wait for the other thread to finish before creating its own connection. If I understand our current EFCore implementation correctly, each a lot of thread will create its own Dbcontext and each context will have its own connection and that will make SQLite unhappy on slower IO or larger database. As long as the current access pattern is not changed I think locked database is unavoidable with SQLite.

@gnattu commented on GitHub (Apr 24, 2025): I think we have to bring back the old write connection lock to EFCore, at least for the SQLite backend. So that all operations that will write to the database has to wait for the other thread to finish before creating its own connection. If I understand our current EFCore implementation correctly, each a lot of thread will create its own Dbcontext and each context will have its own connection and that will make SQLite unhappy on slower IO or larger database. As long as the current access pattern is not changed I *think* locked database is unavoidable with SQLite.
Author
Owner

@JPVenson commented on GitHub (Apr 24, 2025):

@gnattu there are a lot of conflicting infos out there regarding that. From what i have gathered, our Sqlite does do optimistic concurrent locking and retries when it observes other connections writing in parallel. From my testing pooling actually increases the number of locks on Windows but reduces them on linux so thats that and even with our previous locking, we had the same issue.

Overall as we have WAL enabled this should not happen in the first place but all points for me towards either and issue with sqlitepcl or an general issue with some external factors. The only real possibility would be if we actually work on a DbContext in parallel as that would 100% cause this issue, but i am fairly certain we do not.

Implementing to test it should be rather easy to do as we now exclusively go over EFCore and locking the SaveChanges method should do the trick if somebody wants to try.

@JPVenson commented on GitHub (Apr 24, 2025): @gnattu there are a lot of conflicting infos out there regarding that. From what i have gathered, our Sqlite does do optimistic concurrent locking and retries when it observes other connections writing in parallel. From my testing pooling actually increases the number of locks on Windows but reduces them on linux so thats that and even with our previous locking, we had the same issue. Overall as we have WAL enabled this should not happen in the first place but all points for me towards either and issue with sqlitepcl or an general issue with some external factors. The only real possibility would be if we actually work on a DbContext in parallel as that would 100% cause this issue, but i am fairly certain we do not. Implementing to test it should be rather easy to do as we now exclusively go over EFCore and locking the SaveChanges method should do the trick if somebody wants to try.
Author
Owner

@kambala-decapitator commented on GitHub (Apr 24, 2025):

your config folder is located on a local device not on a network share?

yes, local device. Media files reside on a usb attached HDD.

if it matters, local device's internal HDD is quite old (and not that fast).

@kambala-decapitator commented on GitHub (Apr 24, 2025): > your config folder is located on a local device not on a network share? yes, local device. Media files reside on a usb attached HDD. if it matters, local device's internal HDD is quite old (and not that fast).
Author
Owner

@SLemons13 commented on GitHub (Apr 24, 2025):

I had convinced myself it was some database issue on my end since my instance has been running for a little over 2 years, so I decided to start fresh. Set up a fresh instance on the same system and switched over to it. Exact same behavior is occurring on the fresh install.

@SLemons13 commented on GitHub (Apr 24, 2025): I had convinced myself it was some database issue on my end since my instance has been running for a little over 2 years, so I decided to start fresh. Set up a fresh instance on the same system and switched over to it. Exact same behavior is occurring on the fresh install.
Author
Owner

@JPVenson commented on GitHub (May 6, 2025):

do you feel confident enough to compile a version of jellyfin yourself to test someting?
if so try compiling https://github.com/jellyfin/jellyfin/pull/14047 and setting the setting in database.xml <LockingBehavior>Pessimistic</LockingBehavior> and see if that helps with the database locked issues

@JPVenson commented on GitHub (May 6, 2025): do you feel confident enough to compile a version of jellyfin yourself to test someting? if so try compiling https://github.com/jellyfin/jellyfin/pull/14047 and setting the setting in `database.xml` `<LockingBehavior>Pessimistic</LockingBehavior>` and see if that helps with the database locked issues
Author
Owner

@JPVenson commented on GitHub (Jul 2, 2025):

Issue will be fixed in 10.11 and can be tested in RC2 though various methods. Follow the release docs to see more.

@JPVenson commented on GitHub (Jul 2, 2025): Issue will be fixed in 10.11 and can be tested in RC2 though various methods. Follow the release docs to see more.
Author
Owner

@SLemons13 commented on GitHub (Oct 10, 2025):

This issue still persists on 10.11 RC8 for me unfortunately, albeit a bit less frequent now. Tried both optimistic and pessimistic locking behaviors.

@SLemons13 commented on GitHub (Oct 10, 2025): This issue still persists on 10.11 RC8 for me unfortunately, albeit a bit less frequent now. Tried both optimistic and pessimistic locking behaviors.
Author
Owner

@gnattu commented on GitHub (Oct 10, 2025):

If even a pessimistic locking can’t resolve this issue for you, you might have to wait until a genuine alternative DBMS like pgsql to be supported. I highly doubt that your database is approaching the limit of what SQLite can handle with current Jellyfin database schema and access pattern

@gnattu commented on GitHub (Oct 10, 2025): If even a pessimistic locking can’t resolve this issue for you, you might have to wait until a genuine alternative DBMS like pgsql to be supported. I highly doubt that your database is approaching the limit of what SQLite can handle with current Jellyfin database schema and access pattern
Author
Owner

@kambala-decapitator commented on GitHub (Oct 10, 2025):

Haven't experienced it any more on v10.10.5

@kambala-decapitator commented on GitHub (Oct 10, 2025): Haven't experienced it any more on v10.10.5
Author
Owner

@SLemons13 commented on GitHub (Oct 10, 2025):

My library is larger but I don't think it's beyond what some other user have. jellyfin.db is 1.4GB at the moment. The crashes happens with 3+ concurrent streams and/or a library scan. Both at the same time makes it very likely. Something like trickplay generation running as well will make it even more frequent. I don't know what I can try to mitigate this. I tried putting the DB onto PCIe based Optane drives to minimize any read/write latency and it made no difference.

@SLemons13 commented on GitHub (Oct 10, 2025): My library is larger but I don't think it's beyond what some other user have. jellyfin.db is 1.4GB at the moment. The crashes happens with 3+ concurrent streams and/or a library scan. Both at the same time makes it very likely. Something like trickplay generation running as well will make it even more frequent. I don't know what I can try to mitigate this. I tried putting the DB onto PCIe based Optane drives to minimize any read/write latency and it made no difference.
Author
Owner

@JPVenson commented on GitHub (Oct 10, 2025):

try setting the parallel scan task limit to something more reasonable like 1/2 your core count. If you have 4 or less cores set it to 1

@JPVenson commented on GitHub (Oct 10, 2025): try setting the parallel scan task limit to something more reasonable like 1/2 your core count. If you have 4 or less cores set it to 1
Author
Owner

@SLemons13 commented on GitHub (Oct 10, 2025):

Parallel scan task limit and parallel image encoding limit have been set to 1 since this issue was opened unfortunately.

@SLemons13 commented on GitHub (Oct 10, 2025): Parallel scan task limit and parallel image encoding limit have been set to 1 since this issue was opened unfortunately.
Author
Owner

@JPVenson commented on GitHub (Oct 10, 2025):

If that is the case and you are running 10.11RC8 with your config on a local device (Not a network share) there seems to be something fundamentally at issue with your setup that interfears with sqlites operation but i cannot tell you what. the Parallel scan task limit = 1 disables all concurrency and the Strict locking behavor essentially does that on a global level.

@JPVenson commented on GitHub (Oct 10, 2025): If that is the case and you are running 10.11RC8 with your config on a local device (Not a network share) there seems to be something fundamentally at issue with your setup that interfears with sqlites operation but i cannot tell you what. the Parallel scan task limit = 1 disables all concurrency and the Strict locking behavor essentially does that on a global level.
Author
Owner

@SLemons13 commented on GitHub (Oct 15, 2025):

Figured it out. I switched from TrueNAS to Rocky linux and the problem continued after re-importing my zpools. I then tried reformatting the drives to XFS and moved the JF data back on. Works fine now using NoLock on XFS. Seems like EFCore didn't like ZFS. I had even disabled filesystem compression and checksums, enabled write caching, and set the block size to match sqlite which should have sped up ZFS quite a bit. Haven't seen a database lock error in 3 days now. They do still happen when trying to use the new database backup function but I'll live with it.

@SLemons13 commented on GitHub (Oct 15, 2025): Figured it out. I switched from TrueNAS to Rocky linux and the problem continued after re-importing my zpools. I then tried reformatting the drives to XFS and moved the JF data back on. Works fine now using NoLock on XFS. Seems like EFCore didn't like ZFS. I had even disabled filesystem compression and checksums, enabled write caching, and set the block size to match sqlite which should have sped up ZFS quite a bit. Haven't seen a database lock error in 3 days now. They do still happen when trying to use the new database backup function but I'll live with it.
Author
Owner

@JPVenson commented on GitHub (Oct 15, 2025):

that is not related to efcore. you should never run sqlite on the ZFS filesystem. That is a known limitation

@JPVenson commented on GitHub (Oct 15, 2025): that is not related to efcore. you should never run sqlite on the ZFS filesystem. That is a known limitation
Author
Owner

@SLemons13 commented on GitHub (Oct 15, 2025):

Since TrueNAS only supports ZFS, and Jellyfin is using sqlite which you're saying should never be run on ZFS, should the TrueNAS SCALE installation documentation be updated to warn users that there may be inherent unavoidable performance issues due to using ZFS?

@SLemons13 commented on GitHub (Oct 15, 2025): Since TrueNAS only supports ZFS, and Jellyfin is using sqlite which you're saying should never be run on ZFS, should the TrueNAS SCALE installation documentation be updated to warn users that there may be inherent unavoidable performance issues due to using ZFS?
Author
Owner

@darkpixel commented on GitHub (Dec 16, 2025):

@JPVenson I did a bit of Googling and only came up with one link that looked relevant to "Don't use sqlite on ZFS" and it was a dead/gone ycombinator link. Can you provide any more information? I have a handful of sqlite databases running on ZFS with no issue....except for this intermittent database issue with Jellyfin.

@darkpixel commented on GitHub (Dec 16, 2025): @JPVenson I did a bit of Googling and only came up with one link that looked relevant to "Don't use sqlite on ZFS" and it was a dead/gone ycombinator link. Can you provide any more information? I have a handful of sqlite databases running on ZFS with no issue....except for this intermittent database issue with Jellyfin.
Author
Owner

@darkpixel commented on GitHub (Dec 18, 2025):

Finally found a bit more info in bug #15101

@darkpixel commented on GitHub (Dec 18, 2025): Finally found a bit more info in bug #15101
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#6819