15 seconds delay until next track begins playing for local files

Hey @Patrick_Thibor,

Thanks for your patience while we work through each thread, and I’m sorry to hear you’ve been running into a reoccurring issue with growing gaps between tracks in your local library.

I’ve enabled diagnostic on your account and see a few errors potentially related to your library cache. Let’s start with clearing it to see if this helps. Steps to follow below:

  • Exit out of Roon
  • Find and open your Roon database
  • Navigate to /Library/Roon/Cache
  • Move the contents of the /Cache folder elsewhere, like your desktop
  • Try restarting Roon and verify if the issue still occurs

If the above does not help, let’s give your database a refresh as well:

  • Create a Backup of your current database
  • Exit out of Roon
  • Navigate to your Roon Database Location
  • Find the folder that says “Roon”
  • Rename the “Roon” folder to “Roon_old”
  • Reinstall the Roon App from our Downloads Page to generate a new Roon folder
  • Verify if the issue persists on a fresh database before restoring the backup

I’ll be on standby for your reply :pray:

Hi benjamin,

thanks for your support.
I followed your instruction for clearing the cache. For 9 hours everything was working as expected. Also these “Debug: [music/profilestats] Computed stats” entries where not created repeatably in the logfile. After 9 hours the gaps between tracks were starting to increase again an the “Debug: [music/profilestats] Computed stats” entries were repeated many times in the logfile.

Your instruction for refreshing the database is not fully clear to me. After reinstalling Roon Server the database is empty. How can i check if the issue persists? Should i do a rescan of the files?
I already put a lot of effort in curating the metadata for many albums. Will this work be gone after refreshing the database or is there a way to refresh the database AND restore my modifications?

Hey @Patrick_Thibor,

Thanks for giving that a try! This is helpful information for our team.

We are checking to see if it is database related, and so by refreshing your database we are able to test to see if your issue continues on a clean slate. Typically, you can re-log into Qobuz or Tidal to test streaming audio without having to re-scan your entire local library. Another option is to only load up a handful of local tracks to continue to test things.

If you take a look at the very first bullet point - create a backup of your database, this will allow you to re-store the newly created database from your saved backup.

Let me know if your issue persists on a fresh database :+1:

Hey @Patrick_Thibor,

Do you by chance have Time Machine in play at all on your Mac mini core?

With that, there may be an issue with your iTunes folders sharing the same drive as your watched folders, can you confirm you’ve properly set Roon to ignore your iTunes folders?

You can confirm this by heading to your Roon Settings>Storage> Select your watched folder > Edit > Ignored Paths.

Lastly, if you could please reproduce the issue with a detailed step-by-step, and share the specific date and time of when the issue occurs, that would be helpful :pray:

Hey benjamin,

i really appreciate that you are looking into the issue.
I have Time Machine running on the Mac mini core.
When i started using Roon some weeks ago i was migrating vom iTunes to Roon. During the first 1-2 weeks i had Roon watching the iTunes folders because i wanted to migrate the playlists from iTunes to Roon. Since then i changed the watch folder path to a pure audio file folder without any iTunes files and i am not running iTunes anymore.

Its hard for me to reproduce the issue in a fully deterministic way.
I have a script that restarts the Roon core every night.
I start using Roon in the morning. From time to time i skip to the next track within an album or start playing a different album before the current track finishes. The new track begins immediately.
The gap between playing tracks stays like this for 8-10 hours. Then its growing up to 24 seconds on one day and remains to be very slow. Unfortunately the restart of the core one a day is not suffienct.
In the logfiles this behaviour/delay is represented by the “Trace: [library] endmutation in XXms” entries. The XX represents the time of the gaps. This time is the sum of all the previous “Debug: [music/profilestats] Computed stats in XXXms, got 50 top albums, 50 top performers, 14 genres” entries in the logfile.
As long a the gap time is good these “computed stats” enties only show up once per skipping to a new track. When the gap times gets higher this is represented by an ever growing number of repeated appearances of this “computed stats” entries in the logfiles.
Do you have access to my logs of should i send you some historic files?

Following you previous suggestion (refresh database), i have reinstalled Roon but i did not try i with an almost empty database. Instead i restored the database from the backup. I need some time to monitor if the issue is now mitigated. As described above it needs some hours to use Roon until the symptoms show up.

Hey @Patrick_Thibor
Have you ever tried just restarting your router when the performance drops?
I’m asking because of my experience with older routers that required a daily unplug to still work properly.

Hi @Axel_Lesch,

thanks for sharing this idea. I will definitely give it a try although i have a pretty recent router and no network issues with any other applications.
The issue can consistently be fixed temporarily by restarting the Roon core server.

Hi @benjamin,

now i can provide you with one specific example. I pressed “Next track” at 01/15 11:14:25.
The playback of the next track startet at 01/15 11:14:40. The time in-between was spend on these related stats calculations.
During these 15 seconds the Roon client is unresponsive. I monitored the Activity Monitor on the Mac Mini and couldn’t see any significant CPU, network rf I/O activities during these 15 seconds. I saw a high number of ports (> 32000) in the Activity Monitor for the Roon Appliance process. After restarting RoonServer everything is back to normal and the port number is 400.
Let me know if you need the complete logfile.

01/15 11:14:25 Debug: [zone XEON] _Advance (Track)
…
15 11:14:26 Debug: [music/profilestats] Computed stats in 1337ms, got 50 top albums, 50 top performers, 21 genres
--- this is repeated 11 times
….
01/15 11:14:40 Trace: [library] endmutation in 14965ms
01/15 11:14:40 Trace: [dbperf] flush 0 bytes, 0 ops in 18 ms (cumulative 1663071636 bytes, 1439358 ops in 92165 ms)
01/15 11:14:40 Info: [XEON] [zoneplayer] Playing: /Volumes/Media Library/Music Library/Music/Oren Ambarchi/Hubris/02 Hubris Part 2.m4a


Hey @Patrick_Thibor,

Thank you for the information! If possible, I’d love to learn more about your migration process. How did you move files onto your new drive?

Typically, Roon and Time Machine are not great together. Here is more information on this:

If you disable time machine, does this issue occur? Is time machine on the same physical drive as your library?

Lastly, does this issue occur when streaming directly to the system output of your core, bypassing Sonorworks?

Hi @benjamin,

for the migration i copied the files from an internal SSD on a PC (XEON) to an external USB drive on the Mac Mini via my network.
Time Machine is using a separate physical disk. I switched off Time Machine now and will monitor if this leads to an improvement.
There is no Sonarworks SoundID on the Mac Mini that is running Roon Core. I can use the Mac Mini as output since a DAC is attached to this system. Using this setup has no impact on the issue with the delays.

I am wondering to wich extend the information from the logfile that i submitted are considered in finding the root cause of the issue. Is there any explanation for

  • why the number of “Computed stats” entries is increasing while running Roon for a while? This is the reason for the delays that i am experiencing.
  • why the computation of statistics needs to be completed before a new track begins playing? I believe this computation is of lower priority than playing music. It could also be executed in parallel on a separate thread.
1 Like

I may add some useful additional information. Based on the logfile entries the main time consumption responsible for the delay in starting the playback are these lines:

12/13 08:49:21 Debug: [music/profilestats] Computed stats in 2926ms, got 50 top albums, 50 top performers, 19 genres
12/13 08:49:23 Debug: [music/profilestats] Computed stats in 2190ms, got 50 top albums, 50 top performers, 19 genres
12/13 08:49:26 Debug: [music/profilestats] Computed stats in 2134ms, got 50 top albums, 50 top performers, 19 genres

Why is this stat computation executed three times in a row and why is it executed before the playback is initiated? Is this a bug?

I am currently in the evaluation phase for Roon and like it very much. This performance issue is the only thing holding me back from a lifetime license.

Hey @Patrick_Thibor,

I wanted to check in on how things are running without Time Machine? And, re-reading this thread, did you try streaming music on a fresh database, before restoring from a saved backup?

Thanks!

Hi @benjamin,

deactivating Time Machine did not make a difference.
Today i tried streaming with an empty database (expect of my Qobuz albums) and later added 1000 files to this database.
The performance was good, but i still see these repeated “Computed stats” entries in the logfile. The difference is, that the execution of each calculation is much faster with an almost empty database than with a large database. I think this is the expected result.
I feel like a broken record but for me the cause for the delays is clearly visible in the logfile. It the repeated execution of the same statistics calculation that need to be completed until the next track starts playing. Would it be possible, that a software engineer looks into this? If this repeated calculation is needed for the Roon system to work, then it should not be executed in a way that is not preventing the playback of music.

01/22 10:36:54 Debug: [music/profilestats] Computed stats in 0ms, got 6 top albums, 11 top performers, 26 genres
01/22 10:36:54 Debug: [music/profilestats] Computed stats in 0ms, got 6 top albums, 11 top performers, 26 genres
01/22 10:36:54 Debug: [music/profilestats] Computed stats in 0ms, got 6 top albums, 11 top performers, 26 genres
01/22 10:36:55 Debug: [music/profilestats] Computed stats in 11ms, got 6 top albums, 11 top performers, 26 genres
01/22 10:36:55 Debug: [music/profilestats] Computed stats in 0ms, got 6 top albums, 11 top performers, 26 genres
01/22 10:36:55 Debug: [music/profilestats] Computed stats in 0ms, got 6 top albums, 11 top performers, 26 genres
01/22 10:36:55 Debug: [music/profilestats] Computed stats in 0ms, got 6 top albums, 11 top performers, 26 genres
01/22 10:36:55 Debug: [music/profilestats] Computed stats in 0ms, got 6 top albums, 11 top performers, 26 genres
01/22 10:36:55 Debug: [music/profilestats] Computed stats in 0ms, got 6 top albums, 11 top performers, 26 genres
01/22 10:36:55 Trace: [library] endmutation in 36ms
1 Like

Everyone gets those its just updating Roons home stats as to whats been recently played, it should have no affect on playback it certainly doesnt on mine.

Hi @benjamin,

i want to share two screenshots to visualize my observation about the port number. It looks as if the beginning of the long delays is correlated with the number of ports going into the region of 30.000.

After a fresh start of the Roon Server i see a few hundred ports for the RoonAppliance:

After some hours the number is 30.000 and still growing. Is this normal? The long delays are correlated to the growing number of ports:

I think this is a cumulative total and nothing to get concerned about?

Hi @CrystalGipsy,

interesting that these are happening for everyone. As you can see in the logfiles in this post

15 seconds delay until next track begins playing for local files - #36 by Patrick_Thibor.

its clearly holding up the playback of a track as you can see in the logfile. Its really strange that this delay is only happening for a few users.

Yes it’s just standard debug output I see it in my logs. If it was a concern support would have already mentioned it.

Try the latest early access build as they released a fix for Qobuz issue see if it helps with your situation worth a go.

Count me in as one of those experiencing these delays between songs. I use a NUC running Legacy 1.8 ROCK into multiple RPi endpoints (DietPi OS) and Meridian 218.

Hey @Patrick_Thibor,

Please update your core and devices to the newest release and let me know if you still run into issues here :+1: