2025-11-17, 04:28 PM
(This post was last modified: 2025-11-17, 04:31 PM by tomstephens89. Edited 1 time in total.)
Database locking issues preventing user/pass login since updating. Same issue present in previous version.
https://github.com/jellyfin/jellyfin/issues/15316
On fast hardware as per signature. Database in default NoLock mode. Never had these issues pre the 10.11.x release.
Im sure there's good reasons, but this new EFCore database migration has been pretty painful since 10.11.0 :-(
https://github.com/jellyfin/jellyfin/issues/15316
On fast hardware as per signature. Database in default NoLock mode. Never had these issues pre the 10.11.x release.
Im sure there's good reasons, but this new EFCore database migration has been pretty painful since 10.11.0 :-(
Code:
Nov 17 16:23:24 userremoved jellyfin[2351]: [16:23:24] [ERR] Error trying to save changes.
Nov 17 16:23:24 userremoved jellyfin[2351]: Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException: The database operation was expected to affect 1 row(s), but actually affected 0 row(s); data may have been modified o r deleted since entities were loaded. See https://go.microsoft.com/fwlink/?LinkId=527962 for information on understanding and handling optimistic concurrency exceptions.
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ThrowAggregateUpdateConcurrencyExceptionAsync(RelationalDataReader reader, Int32 commandIndex, I nt32 expectedRowsAffected, Int32 rowsAffected, CancellationToken cancellationToken)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeResultSetWithRowsAffectedOnlyAsync(Int32 commandIndex, RelationalDataReader reader, Cance llationToken cancellationToken)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToke n)
Nov 17 16:23:24 userremoved jellyfin[2351]: message repeated 2 times: [ at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, Cancel lationToken cancellationToken)]
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChangesAsync(IList`1 entries, CancellationToken cancellationToken)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancell ationToken)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Jellyfin.Database.Implementations.JellyfinDbContext.<>c__DisplayClass62_0.<<SaveChangesAsync>b__0>d.MoveNext()
Nov 17 16:23:24 userremoved jellyfin[2351]: --- End of stack trace from previous location ---
Nov 17 16:23:24 userremoved jellyfin[2351]: at Jellyfin.Database.Implementations.Locking.NoLockBehavior.OnSaveChangesAsync(JellyfinDbContext context, Func`1 saveChanges)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Jellyfin.Database.Implementations.JellyfinDbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
Nov 17 16:23:24 userremoved jellyfin[2351]: [16:23:24] [ERR] Error processing request. URL POST /Users/authenticatebyname.
Nov 17 16:23:24 userremoved jellyfin[2351]: Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException: The database operation was expected to affect 1 row(s), but actually affected 0 row(s); data may have been modified o r deleted since entities were loaded. See https://go.microsoft.com/fwlink/?LinkId=527962 for information on understanding and handling optimistic concurrency exceptions.
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ThrowAggregateUpdateConcurrencyExceptionAsync(RelationalDataReader reader, Int32 commandIndex, I nt32 expectedRowsAffected, Int32 rowsAffected, CancellationToken cancellationToken)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeResultSetWithRowsAffectedOnlyAsync(Int32 commandIndex, RelationalDataReader reader, Cance llationToken cancellationToken)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToke n)
Nov 17 16:23:24 userremoved jellyfin[2351]: message repeated 2 times: [ at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, Cancel lationToken cancellationToken)]
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChangesAsync(IList`1 entries, CancellationToken cancellationToken)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancell ationToken)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Jellyfin.Database.Implementations.JellyfinDbContext.<>c__DisplayClass62_0.<<SaveChangesAsync>b__0>d.MoveNext()
Nov 17 16:23:24 userremoved jellyfin[2351]: --- End of stack trace from previous location ---
Nov 17 16:23:24 userremoved jellyfin[2351]: at Jellyfin.Database.Implementations.Locking.NoLockBehavior.OnSaveChangesAsync(JellyfinDbContext context, Func`1 saveChanges)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Jellyfin.Database.Implementations.JellyfinDbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Jellyfin.Server.Implementations.Users.UserManager.UpdateUserInternalAsync(JellyfinDbContext dbContext, User user)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Jellyfin.Server.Implementations.Users.UserManager.UpdateUserAsync(User user)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Jellyfin.Server.Implementations.Users.UserManager.UpdateUserAsync(User user)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Jellyfin.Server.Implementations.Users.UserManager.AuthenticateUser(String username, String password, String remoteEndPoint, Boolean isUserSession)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Emby.Server.Implementations.Session.SessionManager.AuthenticateNewSessionInternal(AuthenticationRequest request, Boolean enforcePassword)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Jellyfin.Api.Controllers.UserController.AuthenticateUserByName(AuthenticateUserByName request)
Nov 17 16:23:24 userremoved jellyfin[2351]: at lambda_method15214(Closure, Object)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMetho dExecutor executor, Object controller, Object[] arguments)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask )
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Sc ope scope, Object state, Boolean isCompleted)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
Nov 17 16:23:24 userremoved jellyfin[2351]: --- End of stack trace from previous location ---
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object s tate, Boolean isCompleted)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
Nov 17 16:23:24 userremoved jellyfin[2351]: --- End of stack trace from previous location ---
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Jellyfin.Api.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManag er)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Jellyfin.Api.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Jellyfin.Api.Middleware.IPBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Jellyfin.Api.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
Nov 17 16:23:24 userremoved jellyfin[2351]: at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context)
Jellyfin 10.11.3 on Bare Metal (Ubuntu 22.04 LTS, Apt Native install)
i7 13700k, 64GB DDR5, 1TB NVME OS/APP, 8 HDD RAID0 MEDIA, 10G NIC
i7 13700k, 64GB DDR5, 1TB NVME OS/APP, 8 HDD RAID0 MEDIA, 10G NIC

