From c6910c303437d122cb0df980738950c1299e706d Mon Sep 17 00:00:00 2001 From: JPVenson Date: Tue, 12 May 2026 20:42:26 +0000 Subject: [PATCH 1/2] Update log for user session related concurrency update fails --- Emby.Server.Implementations/Session/SessionManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index 1782b53e10..2885b89e3a 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -271,9 +271,9 @@ namespace Emby.Server.Implementations.Session user.LastActivityDate = activityDate; await _userManager.UpdateUserAsync(user).ConfigureAwait(false); } - catch (DbUpdateConcurrencyException e) + catch (DbUpdateConcurrencyException) { - _logger.LogDebug(e, "Error updating user's last activity date."); + _logger.LogDebug("Error updating user's last activity date due to concurrency conflict. This is an expected event."); } } } From a47da0f1a3c68ed2a418416f24e3d7b0ed704ed0 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Tue, 12 May 2026 21:11:15 +0000 Subject: [PATCH 2/2] Update logging message for DbConcurrency messages --- .../Jellyfin.Database.Implementations/JellyfinDbContext.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs index f6fce7279a..83c15aa647 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs @@ -273,6 +273,11 @@ public class JellyfinDbContext(DbContextOptions options, ILog }).ConfigureAwait(false); return result; } + catch (DbUpdateConcurrencyException) + { + // a concurrency exception is supposed to be always handled by the invoker of the method, logging it here is only causing log bloat. + throw; + } catch (Exception e) { logger.LogError(e, "Error trying to save changes.");