Fallenbagel / jellyseerr

Fork of overseerr for jellyfin support.
https://docs.jellyseerr.dev/
MIT License
3.57k stars 224 forks source link

Jellyfin 10.9.1 crashes when Jellyseerr is running #753

Closed DwayneGoddem closed 4 months ago

DwayneGoddem commented 4 months ago

Description

After the release of Jellyfin 10.9.1 (not tested on 10.9.0) Jellyfin crashed when videos are played.

Is an update to the API required in Jellyseerr to be compatible again or is this a Jellyfin issue?

Version

1.8.1

Steps to Reproduce

install Jellyfin 10.9.1 Connect Jellyseerr 1.8.1 start streaming movies/Tv more than 1 stream at a time (about 3 or more) from Jellyfin and wait for Jellyfin to crash and freeze.

This happens on Windows or Linux based systems

Screenshots

No response

Logs

There is no logs Jellyfin just stops.

There are some messages about Temp files having a sharing violation but that is abut it

Platform

desktop

Device

Windows

Operating System

Windows 10

Browser

Chrome

Additional Context

No response

Code of Conduct

Fallenbagel commented 4 months ago

Hmm. This doesn't happen to me or some other users who already upgraded as well. Are you sure it's jellyseerr related?

Sounds like a jellyfin issue though. Why do you think it crashed because of jellyseerr?

DwayneGoddem commented 4 months ago

There is a bunch of people having this issue.

its also reported on the Jellyfin Github https://github.com/jellyfin/jellyfin/issues/11624

and a few people like me found by shutting down Jellyseerr the crashing issue stops.

Fallenbagel commented 4 months ago

There is a bunch of people having this issue.

its also reported on the Jellyfin Github https://github.com/jellyfin/jellyfin/issues/11624

and a few people like me found by shutting down Jellyseerr the crashing issue stops.

I see. Which is why I asked. Logs are needed to understand the issue and logs weren't provided which is why I asked.

I'll have to check myself and try to reproduce this.

vincejv commented 4 months ago

i'm using develop tag for jellyseerr and latest unstable from jellyfin, never had issues for the past 2 months of using it.

Panzhunter commented 4 months ago

I'm using the latest versions of both Jellyfin (Linuxserver.io version:- 10.9.1ubu2204-ls12 Build-date:- 2024-05-13T00:43:50+00:00) and Jellyseer (1.8.1 latest) and I'm not having any issues. I'm running 3 different streams now just to test but I don't really understand how this would be a Jellyseer issue.

alchemyyy commented 4 months ago

Running 4 streams at the moment along with 2 jellyseerr instances with jellyseerr 1.8.1 and jellyfin 10.9.1 without issue.

Jellyseerr is running on a windows vm, Jellyfin is running on a linux vm.

Newex commented 4 months ago

Ok my jellyfin does crash, but I thought it was because I also was running the Trickplay encoding, on all cores, while streaming.

My "crash" is more like a complete freeze, which then restarts the pod (k8s).

I cannot attribute my freeze to jellyseerr (running version 1.7.0)... I suspect after trickplay is done encoding, I wont have any problems. But this taken forever 😪

DwayneGoddem commented 4 months ago

Ok my jellyfin does crash, but I thought it was because I also was running the Trickplay encoding, on all cores, while streaming.

My "crash" is more like a complete freeze, which then restarts the pod (k8s).

I cannot attribute my freeze to jellyseerr (running version 1.7.0)... I suspect after trickplay is done encoding, I wont have any problems. But this taken forever 😪

Yes its a freeze the services are still active not not responding.

It also makes so sense why stopping Jellyseer fixes the issue but others are finding the same thing. Yes I get it others are not having the issue.

Mine are all running on the same system Jellyfin is running in local Windows 10 jellyseer running in docker on the same windows 10 other ARR sonarr radarr etc all running native on the same windows 10 Homarr runign in docker on the same box

everything was fine on 10.8.x after after going 10.9.1 with Jellyseer running jellyfin keeps freezing. then sopped there is no issue. :(

phyzical commented 4 months ago

no crashes here, id say its a jellyfin specific problem

DwayneGoddem commented 4 months ago

There is a bunch of people having this issue. its also reported on the Jellyfin Github jellyfin/jellyfin#11624 and a few people like me found by shutting down Jellyseerr the crashing issue stops.

I see. Which is why I asked. Logs are needed to understand the issue and logs weren't provided which is why I asked.

I'll have to check myself and try to reproduce this.

There is nothing logged that is the issue. Its going to make it a pain to fix or find the root cause of the issue.

vincejv commented 4 months ago

yeah i doubt this is a jellyseerr issue at all, the least jellyseerr does is call on the Jellfin API, if calling that specific api in a specific manner that jellyseerr does freezes the Jellyfin server then it's defo an upstream issue introduced in the latest version.

Newex commented 4 months ago

Ok I disabled Jellyseerr now I can encode trickplay and watch without freezing... huh 🤔

The only logs I found in jellyfin were:

Details

[00:25:41] [ERR] [896] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL POST /DisplayPreferences/usersettings. Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException: The database operation was expected to affect 1 row(s), but actually affected 0 row(s); data may have been modified or deleted since entities were loaded. See https://go.microsoft.com/fwlink/?LinkId=527962 for information on understanding and handling optimistic concurrency exceptions. at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ThrowAggregateUpdateConcurrencyException(RelationalDataReader reader, Int32 commandIndex, Int32 expectedRowsAffected, Int32 rowsAffected) at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeResultSetWithRowsAffectedOnly(Int32 commandIndex, RelationalDataReader reader) at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.Consume(RelationalDataReader reader) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(IEnumerable`1 commandBatches, IRelationalConnection connection) at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChanges(IList`1 entries) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(IList`1 entriesToSave) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(StateManager stateManager, Boolean acceptAllChangesOnSuccess) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.<>c.b__112_0(DbContext _, ValueTuple`2 t) at Microsoft.EntityFrameworkCore.Storage.NonRetryingExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(Boolean acceptAllChangesOnSuccess) at Microsoft.EntityFrameworkCore.DbContext.SaveChanges(Boolean acceptAllChangesOnSuccess) at Microsoft.EntityFrameworkCore.DbContext.SaveChanges() at Jellyfin.Server.Implementations.JellyfinDbContext.SaveChanges() at Jellyfin.Server.Implementations.Users.DisplayPreferencesManager.SaveChanges() at Jellyfin.Api.Controllers.DisplayPreferencesController.UpdateDisplayPreferences(String displayPreferencesId, Nullable`1 userId, String client, DisplayPreferencesDto displayPreferences) at lambda_method3598(Closure, Object, Object[]) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) 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.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.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.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)

I was skeptical, but stopping Jellyseerr did indeed made it possible to watch a whole show without freezing, I am surprised.

My Jellyseerr was an old one (1.7.0) and jellyfin is (10.9.1).

DwayneGoddem commented 4 months ago

Ok I disabled Jellyseerr now I can encode trickplay and watch without freezing... huh 🤔

The only logs I found in jellyfin were:

Details I was skeptical, but stopping Jellyseerr did indeed made it possible to watch a whole show without freezing, I am surprised.

My Jellyseerr was an old one (1.7.0) and jellyfin is (10.9.1).

oh I agree. Looking at the change log on Jellyfin 10.9.0 there was a quite a few API changes. This is why I was not sure if Jelleyserr needs to update its API connection to match the changers or its Jellyfin that just has a bug.

vincejv commented 4 months ago

as far as I know none of the Servarr Apps uses Jellyfin's API by default, only Jellyseerr does this, if calling the Jellyfin API while transcoding/playing stuff causes a deadlock or freeze issue then that is an upstream issue not Jellyseerr...

vincejv commented 4 months ago

@DwayneGoddem it's an upstream issue https://github.com/jellyfin/jellyfin/pull/11670

Fallenbagel commented 4 months ago

Jellyfin v10.9.2 just got released! 🎉

Upgrading to this should fix the issue.