Jump to content

Random on a genre or playlist takes few minutes to start !


Recommended Posts

Posted

Hi

Here is the problem I have since a while with Emby. Emby server is running on a beefy server that has no problem of ressource in processor, RAM and storage (Intel(R) Xeon(R) Gold 6130 CPU @ 2.10GHz, 64 cores 128Go RAM 200To storage).

When I try to start a random play in a Music genre or in a playlist it's going to spin during few minutes before the play really starts (during that time the interface is dead). If I'm patient it'll start well after few minutes.

Problem is the same if I use web interface of Emby server or android client for example.

It's same symptom if instead of doing the random on the Genre page, I do it in track list of the genre (even in some genres where there is only a hundred tracks and not thousands).

I attach logs if it can help.

Thanks

 

Vincèn

embyserver.txt

Posted

Hi, we're looking into it. Thanks.

  • Thanks 2
Posted

Additional infos: while I get the spinning wheel in client where I try to get the random, all client interfaces whatever the client used (web, android app,..) is not working and spinning wheel too :(

Posted

It looks like the random command on music stresses the db I suspect as all interaction with emby interface in frontend is impossible but backend still works fine.

If someone is playing something on the server it's not affected but impossible to start a new play during that busy time !

I don't see any increase on processor use or disk access but Emby is just blocked :(

Posted

HI, we are looking into this. Thanks for reporting.

  • Like 1
Posted

An other side effect: when it's working on starting the random play on music, if there is a scan in progress it's freezed also time the random play has started !

It looks like it freezes completely Emby server (although it doesn't look to stress db so much as I don't see any increase on drive access).

Any updates on your side about the problem ?

Posted

Hi, we are looking into it. Thanks.

Posted

Hi @Luke

 

Some updates about it ? as it's really annoying that problem :(

 

Thanks

Posted
7 hours ago, vincen said:

Hi @Luke

 

Some updates about it ? as it's really annoying that problem :(

 

Thanks

Hi, we are still looking into it. Thanks.

  • Like 1
visproduction
Posted

Version 4.9.0.30 beta
Checked everywhere and all my media random playback works immediately, from movies / genres, music /genres, playlists.  I don't have media that needs transcoding.  Maybe that is part of the issue.

Posted
19 minutes ago, visproduction said:

Version 4.9.0.30 beta
Checked everywhere and all my media random playback works immediately, from movies / genres, music /genres, playlists.  I don't have media that needs transcoding.  Maybe that is part of the issue.

Thanks @visproductionfor comparison ;) There is no transcoding involved as it's some FLAC files that are played natively on all my devices. Problem is present since quite few versions on my side. I don't want to install beta as I can't take the risk to mess the system and have to restore 😉 Mind to indicate how many tracks you have in your music library ? mine has around 80 000 tracks so I'm thinking it might be the quantity of tracks in the db of Emby that starts to be a problem....

visproduction
Posted

Vinc,

I have 2000 or so tracks.  Emby runs on an SSD drive that has no libraries on it.  All the libraries are on other drives connected via SATA to the mobo.  I do not have Flac files, although I actually prefer that quality.  All my music tracks are videos on h.264 usually 480P and most are either MP3 or AAC audio.  Maybe it's something to do with access rights, although that usually causes no streaming at all.

Hope that helps.

Posted
8 hours ago, visproduction said:

I have 2000 or so tracks.  Emby runs on an SSD drive that has no libraries on it.  All the libraries are on other drives connected via SATA to the mobo.  I do not have Flac files, although I actually prefer that quality.  All my music tracks are videos on h.264 usually 480P and most are either MP3 or AAC audio.  Maybe it's something to do with access rights, although that usually causes no streaming at all.

Quite similar configuration here, OS and Emby on dual SSD in RAID, and all medias files on a (very) large RAID system. No problem of rights for sure as it would prevent as you stated play at all ;)

Posted
1 minute ago, visproduction said:

Vince,

hmmmm, what about this type of issue with the Array?
 https://www.stellarinfo.com/blog/common-symptoms-of-raid-array-failures/

hi @visproduction

Thanks for your attempt to help but it's clearly not a problem of storage or hw but purely sw in Emby ;) my RAIDs in the server (out of the OS one that are traditionnal Linux raid) are running on ZFS and are fully monitored for any issues on drives that compose them ;) Considering server is able to cope with at least 10 simultaneous streams even with transcoding it should not be a problem to start an audio playlist ;) When I try to play a playlist or random on a genre, there is no extra actvity on drives and system neither RAM it's just Emby that overloads/loops itself (not sure how to say that) so it becomes unavailable for few minutes before it comes back to normal (so it stops either after a time-out or a very long non optimised process). I wanted to look in Emby logs but pfiu it's terrible how chatty it is so quite difficult to find anything interesting in it and not very familiar with error messages of Microsoft pseudo technologies 😁

The problem is there since at least a year as I always got it with Emby since first days once I had all my Music libraries indexed properly.

visproduction
Posted

Vince,

OK, I am guessing here...  Why is there a 7 second delay when Get switches from image retrieval to audio and why is there bouncing around from host1, host2, host4, host5?  Are these the different directories of the RAID drives?    Since you say data retrieval is fine, perhaps Emby has some issue retrieving from multiple sections of RAID arrays.

Starting line 615 of your log;
 

Quote

2024-10-17 10:29:52.666 Info Server: http/2 Response 500 to host1. Time: 1906ms. GET https://host2:8920/emby/Items/506287/Images/Primary?maxHeight=199&maxWidth=199&tag=7ad854f6e75d90ff688d23b92f22a693&quality=90
2024-10-17 10:36:30.139 Info Server: http/2 Response 500 to host3. Time: 300469ms. GET https://host2:8920/emby/Sync/Items/Ready?TargetId=4DBFefKpQctJgYJdiMWTvAbgu0XAyu3yfJ4Qh8A1o&X-Emby-Client=Emby for Windows&X-Emby-Device-Name=NUC-TV&X-Emby-Device-Id=4DBFefKpQctJgYJdiMWTvAbgu0XAyu3yfJ4Qh8A1o&X-Emby-Client-Version=1.1.574.0&X-Emby-Token=x_secret2_x
2024-10-17 10:36:30.173 Info Server: http/2 HEAD https://host2:8920/emby/Audio/561921/universal?UserId=63c11454fb7b4845b24f382dd5361191&DeviceId=52e93bf4-404e-4a15-b098-321afbc2c464&MaxStreamingBitrate=4000002&Container=opus,mp3|mp3,mp2,mp3|mp2,m4a|aac,mp4|aac,flac,webma,webm,wav|PCM_S16LE,wav|PCM_S24LE,ogg&TranscodingContainer=aac&TranscodingProtocol=hls&AudioCodec=aac&api_key=x_secret1_x&PlaySessionId=1729144085614&StartTimeTicks=0&EnableRedirection=true&EnableRemoteMedia=false. Source Ip: host1, Accept=*/*, Host=host4, User-Agent=Mozilla/5.0 (X11; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0, Accept-Encoding=gzip, deflate, br, zstd, Accept-Language=fr,en-US;q=0.7,en;q=0.3, Referer=host5, TE=trailers, DNT=1, sec-fetch-dest=empty, sec-fetch-mode=cors, sec-fetch-site=same-origin, sec-gpc=1, priority=u=4
2024-10-17 10:36:30.246 Info App: User policy for vincen. EnableAudioPlaybackTranscoding: True
2024-10-17 10:36:30.287 Info Server: http/2 Response 200 to host1. Time: 115ms. HEAD https://host2:8920/emby/Audio/561921/universal?UserId=63c11454fb7b4845b24f382dd5361191&DeviceId=52e93bf4-404e-4a15-b098-321afbc2c464&MaxStreamingBitrate=4000002&Container=opus,mp3|mp3,mp2,mp3|mp2,m4a|aac,mp4|aac,flac,webma,webm,wav|PCM_S16LE,wav|PCM_S24LE,ogg&TranscodingContainer=aac&TranscodingProtocol=hls&AudioCodec=aac&api_key=x_secret1_x&PlaySessionId=1729144085614&StartTimeTicks=0&EnableRedirection=true&EnableRemoteMedia=false
2024-10-17 10:36:30.296 Info Server: http/2 GET https://host2:8920/emby/Audio/561921/universal?UserId=63c11454fb7b4845b24f382dd5361191&DeviceId=52e93bf4-404e-4a15-b098-321afbc2c464&MaxStreamingBitrate=4000002&Container=opus,mp3|mp3,mp2,mp3|mp2,m4a|aac,mp4|aac,flac,webma,webm,wav|PCM_S16LE,wav|PCM_S24LE,ogg&TranscodingContainer=aac&TranscodingProtocol=hls&AudioCodec=aac&api_key=x_secret1_x&PlaySessionId=1729144085614&StartTimeTicks=0&EnableRedirection=true&EnableRemoteMedia=false. Source Ip: host1, Accept=audio/webm,audio/ogg,audio/wav,audio/*;q=0.9,application/ogg;q=0.7,video/*;q=0.6,*/*;q=0.5, Host=host4, User-Agent=Mozilla/5.0 (X11; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0, :method=GET, Accept-Encoding=identity, Accept-Language=fr,en-US;q=0.7,en;q=0.3, Range=bytes=0-, Referer=host5, TE=trailers, DNT=1, sec-fetch-dest=audio, sec-fetch-mode=cors, sec-fetch-site=same-origin, sec-gpc=1, priority=u=4
2024-10-17 10:36:30.298 Info App: User policy for vincen. EnableAudioPlaybackTranscoding: True
2024-10-17 10:36:30.298 Info SessionManager: Adding playSession 1729144085614 to session 395cab0512aa2b5b29a3d8abd6fd4f9c
2024-10-17 10:36:30.448 Info Server: http/2 POST https://host2:8920/emby/Sessions/Playing?X-Emby-Client=Emby Web&X-Emby-Device-Name=Firefox&X-Emby-Device-Id=52e93bf4-404e-4a15-b098-321afbc2c464&X-Emby-Client-Version=4.8.10.0&X-Emby-Token=x_secret1_x&X-Emby-Language=fr&reqformat=json. Source Ip: host1, UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0


 

Posted (edited)
1 hour ago, visproduction said:

OK, I am guessing here...  Why is there a 7 second delay when Get switches from image retrieval to audio and why is there bouncing around from host1, host2, host4, host5?  Are these the different directories of the RAID drives?    Since you say data retrieval is fine, perhaps Emby has some issue retrieving from multiple sections of RAID arrays.

Absolutely no idea why it's doing that ! The metas directory of Emby is on one unique directory on a volume, and music is in one unique directory on an other volume.

In fact I might have an idea: isn't it a problem with IPV6 ? as machine has IPV6 connectivity and it's used by most of clients but it includes multiple addresses (it's the way it works in IPV6). I'm going to deactivate the IPV6 dns entry and check tomorrow or in 48h to see if it makes a difference and will let you know.

Thanks @visproductionfor your help ;)

Update: I tried to play the random in a genre by connecting at server using it's IPV4 but it doesn't make any change in term of delays to start the random :( so not sure what generates that problem ! @Lukean idea ?

Edited by vincen
Posted

Just had a go at 1 of my playlists.

image.png.6ed55e225983042aa9d4de84448b5430.png

It starts after 4-5 seconds.

My library of music contains.

image.thumb.png.d559c5bcb2a04f67bb78c45d12e6b385.png
and using shuffle from song section in my library starts the playback with in 2-3 seconds.

I did however make a new install when 4.8 was released, instead of a update.

Was this also an issue before 4.8 release ?

Posted
7 minutes ago, Neminem said:

I did however make a new install when 4.8 was released, instead of a update.

Was this also an issue before 4.8 release ?

Thanks @Neminemfor comparison, so clearly there is an issue specific at mine ! Well the Emby server is around a little more than a year old so not sure if I started straight with 4.8 or stil 4.7.something at that time. As far as I remember the issue is there since the begin.

Media db here has been resetted 3 weeks ago due to an unexplainable bug in Emby Server that deleted the whole media db 🥵 so everything has been reindexed in db. For info current size of library.db file is 1.5G.

Posted

My library db is only 471mb there might be something there.

I have also set my database cache size to x2 bigger than my db size.

So in my case that would be ruffle 1000mb, if I remember right, that's limited to 4096mb, and everything over is wasted.

image.png.8b183c0d39d051ccf0c0e5c9dc17da53.png

Posted
1 hour ago, Neminem said:

My library db is only 471mb there might be something there.

I have also set my database cache size to x2 bigger than my db size.

So in my case that would be ruffle 1000mb, if I remember right, that's limited to 4096mb, and everything over is wasted.

Well I guess it depends of library size, the server is quite big in term of quantity of medias 😇

Here it's setup at 3G the cache size. I'm curious if I should not try the option to clean the database at next shutdown or perhaps run the procedure as with a corrupted db where basically you dump the db in a text file and reimport it in a new one ?

Posted

ok do you see this in your Scheduled Taskes ?

image.png.4d2b819eecca4b2eda477af6a4592331.png

Posted
22 minutes ago, Neminem said:

do you see this in your Scheduled Taskes ?

Yeah but it's not activated on mine as I'm quite confused how it works. Description indicates it's to allow a Vacuum Database at next startup of Emby Server but you have to schedule it ?? Or does the schedule done for that task implies it'll restart the Emby server at that schedule to do the Vacuum Database ?

Posted

Hmm your are right, the wording is confusing.

I figured it would run without a restart, I have had it on forever, but and is says 3 days ago in my screenshot.

If I click on it, it states this

image.png.b361f26b5c7db5ed3ce2394687465a5b.png

Its still confusing, if a restart is needed.

I do however have a weekly, restart when I do appdata backup, in unRaid, so it might have been there the vacuum was done.

Posted

When this task runs all it does is enable "Vacuum the database on the next Emby Server startup" option under the database tab. A restart is required to actually run the vacuum, which will reset this back to disabled.

  • Thanks 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...