Recurring Roon database corruption issue on Windows 11 (ref#GALY6A)

What’s happening?

· I'm having trouble connecting to Roon

What type of connection issue?

· Something else

How can we help?

· None of the above

Other options

· Other

Describe the issue

Starting about 3 weeks ago, I have Roon report database corruption about once a week. There is an error in the RoonServer log saying the database is corrupted. Roon asks me to restore a database backup, which I do, and then everything is fine for about a week. It is not consistent on which day of the week it happens, its random. The server is on Windows 11 and has been running on this machine happily for about 8 months with no problems at all until this problem started. I've read that this issue can sometimes be caused by Malwarebytes scans but I checked and the last scan that was run was 5 days ago and no issue, but this morning I had the corrupt database error again with no scans since 5 days ago so it doesn't seem to be related to Malwarebytes.

Describe your network setup

I have a fairly simple network. A main router connected to the internet and then several other unmanaged switches. Most Roon devices are wired connections with a few using wifi. I have no connectivity issues and its been stable like this for 8 months or more.

Please use the guide below for troubleshooting and report your findings:

1 Like

Hey @John_Knoepfle,

Thanks for writing in, and I’m so sorry to hear about your database corrupting!

I do see fresh instances of corruption based on a recent diagnostic report:

10/06 Warn: [broker] detected corrupt database, notifying client

@BlackJack has shared the best next steps via the KB article above - essentially you have two options:

  1. Keep testing older saved backups to see if any of them predate the corruption.
  2. Start with a completely fresh Roon Server database - far from an ideal solution, so I’m hoping there might be a backup that exsists prior to falling into a corrupted state.

We’ll be monitoring for your reply and results - we can also check Roon Server logs for you after you’ve updated to a different backup to check for corruption traces. :crossed_fingers:

Hi Benjamin,

Thank you for the reply here. Luckily I have some backups that go back to about a month before this problem started. I will wait until the next corruption occurs and then try to restore that old backup.

One update to this issue. This morning, I got an error again that the DB was corrupted. I tried doing the restore from the oldest backup and Roon indicated that it was going to restore the backup but then did nothing. No restore, nothing. I tried several times but nothing happened. I restarted RoonServer to see if that would allow me to restore the backup but instead, as soon as I restarted the server, everything was fine without the restore. I checked the RoonServer logs and indeed there were no errors in the log indicating database corruption, so it appears it was a false alarm!!

1 Like

No, just a built-in fallback to allow users temporary access to a corrupted database until Roon encounters a corrupted data-point again. Please fix your database by loading a backup that is not corrupted after you ensured your hardware / computer isn’t failing.

1 Like

Thanks for the update @John_Knoepfle! Unfortunately, @BlackJack is correct above - there aren’t false alarms when it comes to corruption in such cases :slightly_frowning_face:

Let us know how some of the older backups perform! We’ll await your results :folded_hands:

Hi Benjamin,

Here’s the latest update on my problem. I had another corruption issue yesterday so I restored the oldest backup I had (other than from last year when I set this system up originally). That backup was almost a month before I started having this problem. It was fine until this evening when I again had a corrupted database from the restore from a month before the problem started. I’m assuming this is telling us that the backups are not the problem? Would you agree?

The server (Windows 11 with all solid state drives only about 1 year old) itself seems to be fine. Disk util shows the all file systems are healthy. I’ve run scans with Malwarebytes and it says the server is clean and everything else on the server is running perfectly. Absolutely no issues.

There have been no recent Malwarebyes scans so that isn’t the cause (last one was 7 days ago).

So that leaves me with BlackJack’s steps:

  • Stop RoonServer
  • Navigate to your RoonServer’s Database Location
  • Find the folder that says “RoonServer”
  • Rename the “RoonServer” folder to “RoonServer_old”
  • Reinstall the RoonServer App from our Downloads Page to generate a new RoonServer folder
  • On the Roon Remotes, press “Use another Roon Server” and connect to the new database
  • Restore a backup

My question now is, what will this accomplish? Is this suggesting that RoonServer itself is the problem? For example, I reinstall RoonServer and it creates a new RoonServer folder, then I restore the backup, should I use the most recent backup?

I’m assuming that gets me a fresh RoonServer assuming something is wrong with it and the backup will get all my history back? Is that all correct?

Thank you,

–John

I’m really frustrated. This RoonServer has been running perfectly for 8 months and this started 3 weeks ago for no apparent reason. I.e. I haven’t changed anything.

You cannot conclude that none of your backups are a problem. It’s possible they have all been silently corrupted. In fact this was a known issue several years back when roon put in a few safeguards to ensure there were at least warnings. But there is always the risk of regressions, especially when roon picks up the pace of maintenance releases as has been the case for a while now. There could also be something amiss with your roon server installation/configuration so a fresh install is well worth trying as others have mentioned.

There is a 3rd possibility. When I first installed roon 7 years ago I got recurring corruption. Eventually I traced it back to my folder structure. As was common practice before roon, metadata was being embedded in folder and file names instead of tags and this was leading to long convoluted path names on disk. At a certain point of about 110k tracks during my initial migration, corruptions would start to appear. Eventually, I completely simplified the folder structure and path names and the problem went away. This was not a quick or easy fix and I still haven’t finished. Neither was it an obvious solution as there seemed to be some dependency with my server GPU, so it was an uncommon combination of factors not everyone had. Do you have a large library? What does your folder structure look like? For example, are path names very long? And/or is the folder structure very flat?, i.e. no differentiation via genre, alphabetical grouping, artist etc.

Good day @John_Knoepfle !

Yes, you are correct about your observation.

Since your oldest backup does not seem to be a problem the only nodes that can be affected are your PC itself and Roon Server.

If you observe BlackJack’s steps you exclude the Roon Server installed on your PC from equation .

So reinstalling Roon Server entirely and restoring oldest backup is what we recommend you to do.

Regards.

Thank you Tony. All good points.

Regarding the 3rd scenario, I wouldn’t consider my path schema complex and it hasn’t changed since I first started using Roon. The basic path is /Music/User/Source/Artist/Album. The only “extra” pieces that are probably not needed anymore is the “User” since Roon was originally on a family PC and I was keeping the libraries separate, now its on a dedicated music server that only I use. The other is the “Source” component which is either the “ripping” software I used such as dbPoweramp or download source such HiResAudio or NativeDSD, etc. I think its a fairly simple schema. Would you agree?

Thank you Alex. That will be my next step when I hit the next DB corruption error. I will report back after I do that.

Thank you,

–John

Hi @John_Knoepfle !

Okay, feel free to get back to us!

Regards.

Yes, its a simple schema. But for larger libraries it may be too simple. It looks like everything is in a single root directory → /Music. Beyond a certain library size roon will choke with a flat schema like that. There are several threads. It may be that adding just a few albums tipped over a stable library.

How many child folders do you have under /Music? My rule of thumb is no more than about 600 in each top level folder. That implies a much more complex schema. Everyone’s mileage will vary. You have to live with your library. But as an example, at any one time I have 5/6 storage locations each with 5/6 top level directories. So that’s 25-30 top level directories, not 1.

I would reinstall roon first as has been mentioned by several to see if that fixes your issues. If it doesn’t, you may have to address an overly flat folder structure.

Thanks @tripleCrotchet. I had my first DB corrutpion issue today after almost a week so now I will try the Roon reinstall to see if that fixes it.

As for my “flat” structure, I think I’m ok. Under /music I have 2 users, under that I have the “source” which constitues only about 35 entries. Under the “source” most are small except for dbPoweramp (which is my main CD ripping software) and that has 445 entries (which equate to artists). Other than that, every directory level in my structure has low numbers of entries.

Also, I haven’t added any new music to my library since months before this problem popped up so I suspect its not the root cause of my corruption issue but I will keep this in mind.

Also, you mentioned that there are several threads on file system structure for Roon. Can you point me to them, I’d love to learn more on best practices here.

Hi @alex_h,

OK, I just reinstalled Roon and restored one of my DB backups. Fingers crossed that this fixes the issue. I will report back in a few days or if I run into another corruption problem.

Best,

–John

@alex_h, I know this issue is autoclosed now but I just wanted to report back for anyone that might read this thread in the future, my Roon reinstall did fix my problem. It’s been running fine now for 10 days after the reinstall. Thank you for all the help.

Hello @John_Knoepfle,

Thank you for the update.

Unfortunately, if even your oldest backups still contain traces of corruption, the only remaining option is to start fresh with a completely new database.

We understand this isn’t ideal, but starting clean ensures that no latent corruption is carried over from previous backups and gives you a stable foundation moving forward.

Please let us know once you’ve completed the setup, and we’ll help confirm that everything is running correctly afterward.

1 Like

This topic was automatically closed 9 days after the last reply. New replies are no longer allowed.