TMDB timeout handling #6393

Closed
opened 2026-02-07 03:34:46 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @Arcturuss on GitHub (Oct 28, 2024).

This issue respects the following points:

  • This is a bug, not a question or a configuration issue; Please visit our forum or chat rooms first to troubleshoot with volunteers, before creating a report. The links can be found here.
  • This issue is not already reported on GitHub (I've searched it).
  • I'm using an up to date version of Jellyfin Server stable, unstable or master; We generally do not support previous older versions. If possible, please update to the latest version before opening an issue.
  • I agree to follow Jellyfin's Code of Conduct.
  • This report addresses only a single issue; If you encounter multiple issues, kindly create separate reports for each one.

Description of the bug

tl;dr: Jellyfin throws 500 "Error processing request" after request to TMDB timeouts, when it really should not.

There is a number of issues about errors caused by themoviedb.org request timeout (mostly due to it not responding over ipv6): #10584 #12255 #12103 and so on. While most issues can be fixed by removing the underlying cause (ipv6), i think handling this kind of errors on Jellyfin side should be fixed too.

Take for example request to show a person metadata (GET | http://localhost:8096/Users/<...>/Items/<...>). When there is no internet connection whatsoever, it works just fine (and logs error System.Net.Http.HttpRequestException: No such host is known. (api.themoviedb.org:443)). But timeout error cause this request to fail completely for some unknown reason.

Additionally, the Web UI is not showing any errors in this case, just spins the spinner endlessly. But I guess this should go to the separate issue.

Reproduction steps

  1. enable ipv6 on your machine
  2. confirm that the host themoviedb.org is resolver to ipv6 address and does not respond to pings
  3. open Jellyfin Web UI, open any movie page and click on any person link

What is the current bug behavior?

Some API requests to Jellyfin fail with code 500 when Jellyfin's request to the TMDB timeouts

What is the expected correct behavior?

These API requests should behave the same way as they behave without internet connection whatsoever. Or at least not return 500 after timeout.

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.0

Environment

- OS: Windows
- Virtualization: No
- Browser: Firefox, Chrome
- Plugins: Artwork, AudioDB, Cover Art Archive, Fanart, MusicBrainz, OMDb, Studio Images, TMDb
- Reverse Proxy: none
- Base URL: none
- Networking: 
- Storage: local

Jellyfin logs

[2024-10-28 15:59:08.533 +04:00] [INF] [27] Jellyfin.Server.Implementations.Users.UserManager: Authentication request for "arcturus" has succeeded.
[2024-10-28 15:59:08.535 +04:00] [INF] [27] Emby.Server.Implementations.Session.SessionManager: Current/Max sessions for user "arcturus": 1/0
[2024-10-28 15:59:08.537 +04:00] [INF] [27] Emby.Server.Implementations.Session.SessionManager: Creating new access token for user e3cd27ea-482b-457f-b445-2bf97d84896e
[2024-10-28 15:59:08.547 +04:00] [INF] [26] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "<ip>" request
[2024-10-28 15:59:39.848 +04:00] [ERR] [25] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing". URL "GET" "/Items/8acc5a5f8c7b9e303db47b6c446fa521".
[2024-10-28 15:59:39.848 +04:00] [ERR] [26] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing". URL "GET" "/Users/e3cd27ea482b457fb4452bf97d84896e/Items/8acc5a5f8c7b9e303db47b6c446fa521".
[2024-10-28 16:00:09.860 +04:00] [ERR] [38] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing". URL "GET" "/Users/e3cd27ea482b457fb4452bf97d84896e/Items/8acc5a5f8c7b9e303db47b6c446fa521".
[2024-10-28 16:00:54.002 +04:00] [ERR] [32] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing". URL "GET" "/Users/e3cd27ea482b457fb4452bf97d84896e/Items/8acc5a5f8c7b9e303db47b6c446fa521".
[2024-10-28 16:00:54.017 +04:00] [ERR] [32] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing". URL "GET" "/Items/8acc5a5f8c7b9e303db47b6c446fa521".
[2024-10-28 16:01:24.331 +04:00] [ERR] [28] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing". URL "GET" "/Users/e3cd27ea482b457fb4452bf97d84896e/Items/8acc5a5f8c7b9e303db47b6c446fa521".
[2024-10-28 16:02:06.072 +04:00] [INF] [31] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2024-10-28 16:04:54.065 +04:00] [INF] [23] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2024-10-28 16:07:42.067 +04:00] [INF] [27] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2024-10-28 16:11:06.063 +04:00] [INF] [9] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.

FFmpeg logs

No response

Client / Browser logs

Request URL: http://:8096/Users/e3cd27ea482b457fb4452bf97d84896e/Items/8acc5a5f8c7b9e303db47b6c446fa521
Request Method: GET
Status Code: 500 Internal Server Error
Remote Address: :8096
Referrer Policy: no-referrer
Response: Error processing request.

Relevant screenshots or videos

No response

Additional information

No response

Originally created by @Arcturuss on GitHub (Oct 28, 2024). ### This issue respects the following points: - [X] This is a **bug**, not a question or a configuration issue; Please visit our forum or chat rooms first to troubleshoot with volunteers, before creating a report. The links can be found [here](https://jellyfin.org/contact/). - [X] This issue is **not** already reported on [GitHub](https://github.com/jellyfin/jellyfin/issues?q=is%3Aopen+is%3Aissue) _(I've searched it)_. - [X] I'm using an up to date version of Jellyfin Server stable, unstable or master; We generally do not support previous older versions. If possible, please update to the latest version before opening an issue. - [X] I agree to follow Jellyfin's [Code of Conduct](https://jellyfin.org/docs/general/community-standards.html#code-of-conduct). - [X] This report addresses only a single issue; If you encounter multiple issues, kindly create separate reports for each one. ### Description of the bug tl;dr: Jellyfin throws 500 "Error processing request" after request to TMDB timeouts, when it really should not. There is a number of issues about errors caused by themoviedb.org request timeout (mostly due to it not responding over ipv6): #10584 #12255 #12103 and so on. While most issues can be fixed by removing the underlying cause (ipv6), i think handling this kind of errors on Jellyfin side should be fixed too. Take for example request to show a person metadata (GET | http://localhost:8096/Users/<...>/Items/<...>). When there is no internet connection whatsoever, it works just fine (and logs error System.Net.Http.HttpRequestException: No such host is known. (api.themoviedb.org:443)). But timeout error cause this request to fail completely for some unknown reason. Additionally, the Web UI is not showing any errors in this case, just spins the spinner endlessly. But I guess this should go to the separate issue. ### Reproduction steps 1. enable ipv6 on your machine 2. confirm that the host themoviedb.org is resolver to ipv6 address and does not respond to pings 3. open Jellyfin Web UI, open any movie page and click on any person link ### What is the current _bug_ behavior? Some API requests to Jellyfin fail with code 500 when Jellyfin's request to the TMDB timeouts ### What is the expected _correct_ behavior? These API requests should behave the same way as they behave without internet connection whatsoever. Or at least not return 500 after timeout. ### 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.0 ### Environment ```markdown - OS: Windows - Virtualization: No - Browser: Firefox, Chrome - Plugins: Artwork, AudioDB, Cover Art Archive, Fanart, MusicBrainz, OMDb, Studio Images, TMDb - Reverse Proxy: none - Base URL: none - Networking: - Storage: local ``` ### Jellyfin logs ```shell [2024-10-28 15:59:08.533 +04:00] [INF] [27] Jellyfin.Server.Implementations.Users.UserManager: Authentication request for "arcturus" has succeeded. [2024-10-28 15:59:08.535 +04:00] [INF] [27] Emby.Server.Implementations.Session.SessionManager: Current/Max sessions for user "arcturus": 1/0 [2024-10-28 15:59:08.537 +04:00] [INF] [27] Emby.Server.Implementations.Session.SessionManager: Creating new access token for user e3cd27ea-482b-457f-b445-2bf97d84896e [2024-10-28 15:59:08.547 +04:00] [INF] [26] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "<ip>" request [2024-10-28 15:59:39.848 +04:00] [ERR] [25] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing". URL "GET" "/Items/8acc5a5f8c7b9e303db47b6c446fa521". [2024-10-28 15:59:39.848 +04:00] [ERR] [26] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing". URL "GET" "/Users/e3cd27ea482b457fb4452bf97d84896e/Items/8acc5a5f8c7b9e303db47b6c446fa521". [2024-10-28 16:00:09.860 +04:00] [ERR] [38] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing". URL "GET" "/Users/e3cd27ea482b457fb4452bf97d84896e/Items/8acc5a5f8c7b9e303db47b6c446fa521". [2024-10-28 16:00:54.002 +04:00] [ERR] [32] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing". URL "GET" "/Users/e3cd27ea482b457fb4452bf97d84896e/Items/8acc5a5f8c7b9e303db47b6c446fa521". [2024-10-28 16:00:54.017 +04:00] [ERR] [32] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing". URL "GET" "/Items/8acc5a5f8c7b9e303db47b6c446fa521". [2024-10-28 16:01:24.331 +04:00] [ERR] [28] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing". URL "GET" "/Users/e3cd27ea482b457fb4452bf97d84896e/Items/8acc5a5f8c7b9e303db47b6c446fa521". [2024-10-28 16:02:06.072 +04:00] [INF] [31] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets. [2024-10-28 16:04:54.065 +04:00] [INF] [23] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets. [2024-10-28 16:07:42.067 +04:00] [INF] [27] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets. [2024-10-28 16:11:06.063 +04:00] [INF] [9] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets. ``` ### FFmpeg logs _No response_ ### Client / Browser logs Request URL: http://<ip>:8096/Users/e3cd27ea482b457fb4452bf97d84896e/Items/8acc5a5f8c7b9e303db47b6c446fa521 Request Method: GET Status Code: 500 Internal Server Error Remote Address: <ip>:8096 Referrer Policy: no-referrer Response: Error processing request. ### Relevant screenshots or videos _No response_ ### Additional information _No response_
OVERLORD added the bugstale labels 2026-02-07 03:34:46 +03:00
Author
Owner

@jellyfin-bot commented on GitHub (Feb 26, 2025):

This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs.

If you have any questions you can use one of several ways to contact us.

@jellyfin-bot commented on GitHub (Feb 26, 2025): This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs. If you have any questions you can use one of several ways to [contact us](https://jellyfin.org/contact).
Author
Owner

@Arcturuss commented on GitHub (Mar 5, 2025):

Should I make a separate issue in TMDB plugin repo?

@Arcturuss commented on GitHub (Mar 5, 2025): Should I make a separate issue in TMDB plugin repo?
Author
Owner

@Shadowghost commented on GitHub (Mar 5, 2025):

Please create an issue about it on https://github.com/jellyfin/TMDbLib

The fix for this is to implement/configure HappyEyeballs (fallback from IPv5 to IPv4) for the HTTP client used by tmdblib.
We already have an implementation for it in Jellyfin but it's for a different HTTP client library and therefore not used by the tmdb calls.

@Shadowghost commented on GitHub (Mar 5, 2025): Please create an issue about it on https://github.com/jellyfin/TMDbLib The fix for this is to implement/configure HappyEyeballs (fallback from IPv5 to IPv4) for the HTTP client used by tmdblib. We already have an implementation for it in Jellyfin but it's for a different HTTP client library and therefore not used by the tmdb calls.
Author
Owner

@jellyfin-bot commented on GitHub (Jul 4, 2025):

This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs.

If you have any questions you can use one of several ways to contact us.

@jellyfin-bot commented on GitHub (Jul 4, 2025): This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs. If you have any questions you can use one of several ways to [contact us](https://jellyfin.org/contact).
Author
Owner

@jellyfin-bot commented on GitHub (Jul 25, 2025):

This issue was closed due to inactivity.

@jellyfin-bot commented on GitHub (Jul 25, 2025): This issue was closed due to inactivity.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#6393