Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some series load indefinitely like one piece #5182

Open
devildant opened this issue Nov 5, 2024 · 2 comments
Open

Some series load indefinitely like one piece #5182

devildant opened this issue Nov 5, 2024 · 2 comments

Comments

@devildant
Copy link

Summary

Hi,
when I try to access certain series like the one piece (same with naruto shippuden) series the page loads indefinitely forced to go back and click on the series again.
I tried with the Pokemon series which is also big, but changes immediately, maybe it's linked to the fact that I have a lot of one piece episodes and none of Pokemon.

same result with chrome and firefox

demo :
demo2

in console browser :

image

I'm not sure the log is very useful

Ombi Version

4.44.1

What platform(s) does this occur on?

Docker

What database are you using?

MySQL

Relevant log output

2024-11-05 21:17:45.141 +01:00 [INF] Quartz Scheduler 3.6.2.0 - 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED' initialized
2024-11-05 21:17:45.141 +01:00 [INF] Using thread pool 'Quartz.Simpl.DefaultThreadPool', size: 10
2024-11-05 21:17:45.143 +01:00 [INF] Using job store 'Quartz.Simpl.RAMJobStore', supports persistence: False, clustered: False
2024-11-05 21:17:45.145 +01:00 [INF] JobFactory set to: Ombi.Schedule.IoCJobFactory
2024-11-05 21:17:45.306 +01:00 [INF] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
2024-11-05 21:17:54.835 +01:00 [ERR] Something bad happened, ErrorMiddleware caught this
System.Threading.Tasks.TaskCanceledException: The operation was canceled.
 ---> System.Threading.Tasks.TaskCanceledException: The operation was canceled.
 ---> System.IO.IOException: Unable to read data from the transport connection: Operation canceled.
 ---> System.Net.Sockets.SocketException (125): Operation canceled
   --- End of inner exception stack trace ---
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
   at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.<SendCoreAsync>g__Core|5_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.<SendCoreAsync>g__Core|5_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpClient.HandleFailure(Exception e, Boolean telemetryStarted, HttpResponseMessage response, CancellationTokenSource cts, CancellationToken cancellationToken, CancellationTokenSource pendingRequestsCts)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Ombi.Api.Api.Request[T](Request request, CancellationToken cancellationToken) in /home/runner/work/Ombi/Ombi/src/Ombi.Api/Api.cs:line 40
   at Ombi.Api.TheMovieDb.TheMovieDbApi.GetMoviesViaKeywords(String keywordId, String langCode, CancellationToken cancellationToken, Nullable`1 page) in /home/runner/work/Ombi/Ombi/src/Ombi.TheMovieDbApi/TheMovieDbApi.cs:line 434
   at Microsoft.Extensions.Caching.Memory.CacheExtensions.GetOrCreateAsync[TItem](IMemoryCache cache, Object key, Func`2 factory)
   at Ombi.Helpers.CacheService.GetOrAddAsync[T](String cacheKey, Func`1 factory, DateTimeOffset absoluteExpiration) in /home/runner/work/Ombi/Ombi/src/Ombi.Helpers/CacheService.cs:line 24
   at Ombi.Core.Engine.V2.MovieSearchEngineV2.SeasonalList(Int32 currentPosition, Int32 amountToLoad, CancellationToken cancellationToken) in /home/runner/work/Ombi/Ombi/src/Ombi.Core/Engine/V2/MovieSearchEngineV2.cs:line 233
   at Microsoft.Extensions.Caching.Memory.CacheExtensions.GetOrCreateAsync[TItem](IMemoryCache cache, Object key, Func`2 factory)
   at Ombi.Helpers.MediaCacheService.GetOrAddAsync[T](String cacheKey, Func`1 factory, DateTimeOffset absoluteExpiration) in /home/runner/work/Ombi/Ombi/src/Ombi.Helpers/MediaCacheService.cs:line 37
   at lambda_method873(Closure, Object)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   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>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   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>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   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 Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Ombi.ApiKeyMiddlewear.Invoke(HttpContext context) in /home/runner/work/Ombi/Ombi/src/Ombi/Middleware/ApiKeyMiddlewear.cs:line 51
   at Ombi.ErrorHandlingMiddleware.Invoke(HttpContext context) in /home/runner/work/Ombi/Ombi/src/Ombi/Middleware/ErrorHandlingMiddlewear.cs:line 24
2024-11-05 21:17:54.895 +01:00 [ERR] Connection id "0HN7TQRL13R2F", Request id "0HN7TQRL13R2F:00000001": An unhandled exception was thrown by the application.
System.InvalidOperationException: Writing to the response body is invalid for responses with status code 204.
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.Advance(Int32 bytes)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponsePipeWriter.Advance(Int32 bytes)
   at Microsoft.AspNetCore.Http.HttpResponseWritingExtensions.Write(HttpResponse response, String text, Encoding encoding)
   at Microsoft.AspNetCore.Http.HttpResponseWritingExtensions.WriteAsync(HttpResponse response, String text, Encoding encoding, CancellationToken cancellationToken)
   at Ombi.ErrorHandlingMiddleware.HandleExceptionAsync(HttpContext context, Exception exception) in /home/runner/work/Ombi/Ombi/src/Ombi/Middleware/ErrorHandlingMiddlewear.cs:line 53
   at Ombi.ErrorHandlingMiddleware.Invoke(HttpContext context) in /home/runner/work/Ombi/Ombi/src/Ombi/Middleware/ErrorHandlingMiddlewear.cs:line 28
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
@devildant
Copy link
Author

I confirm that the bug only occurs with series with a lot of episodes and which are present in plex. I tested with the "The Young and the Restless" series which contains more than 1500 episodes and the bug does not occur because I do not have the series in plex

@devildant
Copy link
Author

devildant commented Nov 6, 2024

Hi @tidusjar i found the cause of the error 502, it's my proxy oauth + reverse proxy, because the timeout was set at 30s (i change for 180s).

the page ends up loading, but it's long, very long, for the one piece series the "[https://xxxxx/api/v2/search/Tv/37854" request lasts 65s...
maybe an optimization to be done on the API side? or paginated the call in order to indicate a loading progress?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant