Jellyfin sync fails silently

Issue description:

Syncing from Jellyfin starts to enumerate Artists and albums, but Tracks stays stuck at 0. Eventually scanning stops without anything added to library.

Logs:

Upload description: binarymelon

Additional information:

 

 

Reproduction steps:

 

  • sync Jellyfin media provider

 

Media provider:

Jellyfin

Screenshots:

     

Check Jellyfin or your proxy logs, but nothing answers

2025-06-23 13:34:51.302 Verbose JellyfinLogger  --> [261] GET https://XXXXX.com/Users/bc04f39571294c3aaa1eb918d4ca0101/Items?Recursive=true&IncludeItemTypes=Audio,AudioBook&ParentId=7e64e319657a9516ec78490da03edccb&ExcludeLocationTypes=Virtual&Fields=MediaSources,Genres,SortName,Path,RunTimeTicks,DateCreated,ProductionYear,CommunityRating,UserDataPlayCount,UserDataLastPlayedDate,Tags&startIndex=0&limit=2000&UserId=bc04f39571294c3aaa1eb918d4ca0101
2025-06-23 13:34:51.307 Verbose JellyfinLogger  --> [261] END GET
2025-06-23 13:36:21.670 Verbose JellyfinLogger  <-- [261] 504 https://XXXXX.com/Users/bc04f39571294c3aaa1eb918d4ca0101/Items?Recursive=true&IncludeItemTypes=Audio,AudioBook&ParentId=7e64e319657a9516ec78490da03edccb&ExcludeLocationTypes=Virtual&Fields=MediaSources,Genres,SortName,Path,RunTimeTicks,DateCreated,ProductionYear,CommunityRating,UserDataPlayCount,UserDataLastPlayedDate,Tags&startIndex=0&limit=2000&UserId=bc04f39571294c3aaa1eb918d4ca0101 (90367ms, 164-byte body)
2025-06-23 13:36:21.675 Verbose JellyfinLogger  <-- [261] <html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>openresty</center>
</body>
</html>

2025-06-23 13:36:21.676 Verbose JellyfinLogger  <-- [261] END HTTP (90368ms, 164-byte body)
2025-06-23 13:36:21.677 Error JellyfinLogger  Request Error (1/3): 504 [<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>openresty</center>
</body>
</html>
]
2025-06-23 13:36:51.678 Verbose JellyfinLogger  --> [602] GET https://XXXXX.com/Users/bc04f39571294c3aaa1eb918d4ca0101/Items?Recursive=true&IncludeItemTypes=Audio,AudioBook&ParentId=7e64e319657a9516ec78490da03edccb&ExcludeLocationTypes=Virtual&Fields=MediaSources,Genres,SortName,Path,RunTimeTicks,DateCreated,ProductionYear,CommunityRating,UserDataPlayCount,UserDataLastPlayedDate,Tags&startIndex=0&limit=2000&UserId=bc04f39571294c3aaa1eb918d4ca0101
2025-06-23 13:36:51.683 Verbose JellyfinLogger  --> [602] END GET
2025-06-23 13:38:22.341 Verbose JellyfinLogger  <-- [602] 504 https://XXXXX.com/Users/bc04f39571294c3aaa1eb918d4ca0101/Items?Recursive=true&IncludeItemTypes=Audio,AudioBook&ParentId=7e64e319657a9516ec78490da03edccb&ExcludeLocationTypes=Virtual&Fields=MediaSources,Genres,SortName,Path,RunTimeTicks,DateCreated,ProductionYear,CommunityRating,UserDataPlayCount,UserDataLastPlayedDate,Tags&startIndex=0&limit=2000&UserId=bc04f39571294c3aaa1eb918d4ca0101 (90662ms, 164-byte body)
2025-06-23 13:38:22.347 Verbose JellyfinLogger  <-- [602] <html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>openresty</center>
</body>
</html>

2025-06-23 13:38:22.348 Verbose JellyfinLogger  <-- [602] END HTTP (90663ms, 164-byte body)
2025-06-23 13:38:22.350 Error JellyfinLogger  Request Error (2/3): 504 [<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>openresty</center>
</body>
</html>
]
2025-06-23 13:39:07.348 Verbose JellyfinLogger  --> [242] GET https://XXXXX.com/Users/bc04f39571294c3aaa1eb918d4ca0101/Items?Recursive=true&IncludeItemTypes=Audio,AudioBook&ParentId=7e64e319657a9516ec78490da03edccb&ExcludeLocationTypes=Virtual&Fields=MediaSources,Genres,SortName,Path,RunTimeTicks,DateCreated,ProductionYear,CommunityRating,UserDataPlayCount,UserDataLastPlayedDate,Tags&startIndex=0&limit=2000&UserId=bc04f39571294c3aaa1eb918d4ca0101
2025-06-23 13:39:07.350 Verbose JellyfinLogger  --> [242] END GET
2025-06-23 13:40:37.568 Verbose JellyfinLogger  <-- [242] 504 https://XXXXX.com/Users/bc04f39571294c3aaa1eb918d4ca0101/Items?Recursive=true&IncludeItemTypes=Audio,AudioBook&ParentId=7e64e319657a9516ec78490da03edccb&ExcludeLocationTypes=Virtual&Fields=MediaSources,Genres,SortName,Path,RunTimeTicks,DateCreated,ProductionYear,CommunityRating,UserDataPlayCount,UserDataLastPlayedDate,Tags&startIndex=0&limit=2000&UserId=bc04f39571294c3aaa1eb918d4ca0101 (90221ms, 164-byte body)
2025-06-23 13:40:37.571 Verbose JellyfinLogger  <-- [242] <html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>openresty</center>
</body>
</html>

2025-06-23 13:40:37.572 Verbose JellyfinLogger  <-- [242] END HTTP (90222ms, 164-byte body)
2025-06-23 13:40:37.573 Error JellyfinLogger  Request Error (3/3): 504 [<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>openresty</center>
</body>
</html>
]

```

Where are the servers located?

You should know it’s your server that you are trying to connect to …

That’s odd if it’s direct, nothing else has any trouble connecting. Also odd I’m not seeing logs on the Jellyfin side.

You connect to your domain name from the error there’s an openresty in front of Jellyfin and that one timeout at 2m30.

Check it’s logs.

I increased my nginx proxy timeout to 10 minutes and it looks like it resolved it. Thanks for your help.

Are the debug logs saved locally so I can inspect them prior to reaching out for help?

Yes you can read them and send them to your mail it’s all in the docs.

But it’s not normal Jellyfin is so slow to answer, a normal server would sync 80 000 songs in those 2.5 minutes

Yeah, I just moved from Plex to Jellyfin and I’ve been running into some issues with performance. My music library has been particularly slow and I’m trying to identify the cause.