jellyfin / jellyfin

The Free Software Media System
https://jellyfin.org
GNU General Public License v2.0
33.81k stars 3.1k forks source link

[Issue]: Group Movies in to Collections Display option Causes timeouts because of recursive isVisible checks #11951

Open jedthe3rd opened 4 months ago

jedthe3rd commented 4 months ago

Please describe your bug

When "Group movies into collections is enabled" under Libraries > Displays it causes api timeouts because of recursive isVisible checks.

Most likely introduced here: https://github.com/jellyfin/jellyfin/pull/8678 As it wasn't occurring in 10.8.z

I was able to pinpoint this issue by running my server data files on a dotnet run version of 10.9.z branch and then debugging to find the source of the thread causing the looping parental rating check.

Reproduction Steps

  1. Install jellyfin and add a home videos and photos library with at least 4000 items that are divided in sub folders
  2. Enable Group movies into collections display option
  3. Wait for library to be scanned
  4. Access library

Jellyfin Version

10.9.0

if other:

No response

Environment

- OS: Windows 11
- Linux Kernel: none
- Virtualization: none
- Clients: All
- Browser: All
- FFmpeg Version: n/a
- Playback Method: n/a
- Hardware Acceleration: n/a
- GPU Model: n/a
- Plugins: n/a
- Reverse Proxy: n/a
- Base URL: n/a
- Networking: n/a
- Storage: NAS SMB server that gets ~650MB/s sequential reads, 5.4K IOPS at < 200 microseconds of latency

Jellyfin logs

"TV Shows" has no parental rating set.
[2024-06-03 23:50:06.474 -06:00] [DBG] [62] MediaBrowser.Controller.Entities.BaseItem: "Books" has no parental rating set.
[2024-06-03 23:50:06.475 -06:00] [DBG] [62] MediaBrowser.Controller.Entities.BaseItem: "Private Movies" has no parental rating set.
[2024-06-03 23:50:06.476 -06:00] [DBG] [62] MediaBrowser.Controller.Entities.BaseItem: "Movies" has no parental rating set.
[2024-06-03 23:50:06.477 -06:00] [DBG] [62] MediaBrowser.Controller.Entities.BaseItem: "Private TV Shows" has no parental rating set.
[2024-06-03 23:50:06.478 -06:00] [DBG] [62] MediaBrowser.Controller.Entities.BaseItem: "Shows" has no parental rating set.
[2024-06-03 23:50:06.479 -06:00] [DBG] [62] MediaBrowser.Controller.Entities.BaseItem: "General Videos" has no parental rating set.
[2024-06-03 23:50:06.480 -06:00] [DBG] [62] MediaBrowser.Controller.Entities.BaseItem: "Recordings" has no parental rating set.
[2024-06-03 23:50:06.481 -06:00] [DBG] [62] MediaBrowser.Controller.Entities.BaseItem: "Music" has no parental rating set.
[2024-06-03 23:50:06.482 -06:00] [DBG] [62] MediaBrowser.Controller.Entities.BaseItem: "Collections" has no parental rating set.
[2024-06-03 23:50:06.482 -06:00] [DBG] [62] MediaBrowser.Controller.Entities.BaseItem: "Playlists" has no parental rating set.
[2024-06-03 23:50:06.483 -06:00] [DBG] [62] MediaBrowser.Controller.Entities.BaseItem: "TV Shows" has no parental rating set.
[2024-06-03 23:50:06.484 -06:00] [DBG] [62] MediaBrowser.Controller.Entities.BaseItem: "Books" has no parental rating set.
[2024-06-03 23:50:06.485 -06:00] [DBG] [62] MediaBrowser.Controller.Entities.BaseItem: "Private Movies" has no parental rating set.
[2024-06-03 23:50:06.486 -06:00] [DBG] [62] MediaBrowser.Controller.Entities.BaseItem: "Movies" has no parental rating set.
[2024-06-03 23:50:06.487 -06:00] [DBG] [62] MediaBrowser.Controller.Entities.BaseItem: "Private TV Shows" has no parental rating set.
[2024-06-03 23:50:06.487 -06:00] [DBG] [62] MediaBrowser.Controller.Entities.BaseItem: "Shows" has no parental rating set.

FFmpeg logs

No response

Please attach any browser or client logs here

chrome_RauTsKDMrh

Please attach any screenshots here

WindowsTerminal_n0ZH0RTSiQ

Code of Conduct

MosZhao commented 3 months ago

I meet an error about 504: The API endpoint: Users/d88858318a2847c8a103484b9b8e88aa/Items/Latest?Limit=16&Fields=PrimaryImageAspectRatio%2CPath&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CThumb&ParentId=772db055fe30a332896493a09158bb2c

image

The server is behind an Nginx Proxy Manager.

Is it the same as this bug?

jedthe3rd commented 3 months ago

I meet an error about 504: The API endpoint: Users/d88858318a2847c8a103484b9b8e88aa/Items/Latest?Limit=16&Fields=PrimaryImageAspectRatio%2CPath&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CThumb&ParentId=772db055fe30a332896493a09158bb2c

image

The server is behind an Nginx Proxy Manager.

Is it the same as this bug?

Turn off group movies into collections in your library settings and if it is the same bug then it should stop happening.