July 31, 20223 yr Hello, I've started getting this error message in both Plex and Sonarr. I've tried the database rebuild troubleshooting on Plex's own support documents to no avail. I've deleted both Plex and Sonarr containers and their app data folders and then reconfigured them from the ground up and then the issue would pop up later again that day. Is something going on with my Unraid system that is corrupting these containers? How can I fix this? Current plex logs are returning: Error: Unable to set up server: sqlite3_statement_backend::loadOne: database disk image is malformed (N4soci10soci_errorE) blackpearl-diagnostics-20220731-0928.zip
August 3, 20223 yr I have the same problem. My Plex, Sonarr/Radarr & Tautulli DB's are corrupting on a regular basis (I've had to become a dab hand at repairing mysql databases.). Here is a link to how to repair plex db's:- youtube repair plex DB Heres how to repair the "arrs" DBs:- https://wiki.servarr.com/useful-tools#recovering-a-corrupt-db-ui if anyone at Unraid could help that would be ace. I use the linux server dockers.
December 23, 20232 yr Was there any update to this issue? I've been running Sonarr/Radarr etc for years with no issue. Recently update unraid to 6.12 (from 6.9 I think) and now no end of issues with corrupt dbs. Regretting the upgrade now.
January 2, 20242 yr I'm also having this problem. It has been occurring for roughly 1 month - I don't know when it first happened. It only seems to be impacting my Radarr instance - Sonarr and Lidarr are having no issues and live on the same ZFS pool.
January 5, 20242 yr On 12/23/2023 at 9:43 PM, grover said: Was there any update to this issue? I've been running Sonarr/Radarr etc for years with no issue. Recently update unraid to 6.12 (from 6.9 I think) and now no end of issues with corrupt dbs. Regretting the upgrade now. I'm in a similar boat, though the issue began prior to updating to 6.12.6. The Docker container appears to start, though the web GUI won't load and then I can see the database errors in the logs. Is it absurd to consider starting from scratch with Sonarr?!
January 30, 20242 yr I have the same error (that's why I'm here), and I haven't yet taken any steps to try to fix it, but I wonder if file/folder permissions have something to do with it? On the same day I believe my Sonarr started not grabbing things and throwing this error, I had Unraid support do some maintenance, including running chmod and chown on all my files.
February 12, 20242 yr Adding myself to the list. Sonarr ,Radarr, Bazarr are all corrupted regularly. I wonder if this has something to do with the daily appdata backup script shutting them down for backups? That's a complete guess, but since I have nothing else to go on, I'm going to try disabling those backups for awhile and see if the corruption stops.
February 12, 20242 yr I am also starting to suspect that this is caused by CA Backup doing its thing. I suspect it is shutting down the dockers in the middle of sonarr/radarr performing database tasks and that leaves the sqlite database in a corrupted state. Unfortunately every time I've brought it up or seen someone else bring it up, the devs just say "well corruption shouldn't ever happen in theory and it must be something wrong with your setup." Not sure what to do at this point since backups are necessary. Here's an issue on the radarr github where I requested a notification be sent when the database is corrupted (which apparently isn't possible). https://github.com/Radarr/Radarr/issues/9007 Edited February 12, 20242 yr by PISTOL_CUPCAKES fixed some weird wording
April 13, 20242 yr I have the same issue and have had so for a long time (not sure how long, a year maybe). I don't have any backup solution in place. Both my Sonnar and Radarr databases keeps corrupting like once a week. I repair and restart, and all is fine for about a week or maybe two. The databases resides on an SSD drive configured as cache, without any data movement. What's on the cache SSD always stays there. I have googled the s**t out of it and it seems like only Unraid users have those problems.
April 22, 20242 yr Just throwing my name in here to let people know they aren't alone - I'm seeing DB corruption on radarr and sonarr every few weeks. Not related to Appdata backup because i haven't been running it. I'm going to try moving the appdata folder for these apps from `user` to a single disk. Wondering if that might help.
May 2, 20242 yr Same issue here but only impacting sonarr, no other containers have issues. Been running fine for a year and a half. The issue just started a few weeks ago but has corrupted the DB multiple times since. May be related to the below post which I also replied to earlier but still don't have a solution. Let me know how it goes on a single disk. I may have to go that route eventually as well if this gets much worse.
May 2, 20242 yr 17 minutes ago, permster said: Same issue here but only impacting sonarr, no other containers have issues. Been running fine for a year and a half. The issue just started a few weeks ago but has corrupted the DB multiple times since. May be related to the below post which I also replied to earlier but still don't have a solution. Let me know how it goes on a single disk. I may have to go that route eventually as well if this gets much worse. I'm running Sonarr and Radarr on a single SSD. Although it's configured as a cache drive (without any data movement), so it might not be completely single and outside of all the Unraid stuff anyway?
May 6, 20242 yr I was quite relieved to find this thread and seeing others having this issue as well. It only happens in Sonarr for me. I've tired starting from scratch, deleting all my config files and starting from a new docker image and my (brand new) DB becomes corrupted in under an hour. Not exactly sure on the start date since I hadn't been using Sonarr for the past 2 weeks but it started semi recently.
June 28, 20242 yr I'm having the same issue specially with Radarr now. Any solutions yet, I don't want to rebuilt again ;-(
June 28, 20242 yr This issue stopped for a month or more but just happened again in Sonarr last week. I still don't know how to fix this as putting the *arr appdata on a single disk seems silly to me. When you say "rebuilt again" it sounds a bit worse than it seems. For most people that aren't constantly changing things all you have to do is restore from the last good backup and your good to go. Before restoring I go check to make sure there aren't any newly added series or movies since the corruption occurred. Those need to be added back after the restore. One thing that might help recovery is to change the backup frequency and retention under Settings > General > Backups which by default is only every 7 days I believe. Does anyone know of a good way to monitor for this issue? The built-in health alerts in Settings > Connect don't catch this. I tried Notifiarr which supposedly monitors for database corruption but wasn't alerted. If I can't find anything I'll probably just write some python code to monitor the logs.db for the issue. Edited June 28, 20242 yr by permster
June 28, 20242 yr That is the issue don't know when the issue started. 😁 I just deleted the config folder and started from scratch add the season by importing the TVshow folders and follow the prompts I don't see a way to change the backup frequency. This also happened to my Plex Server and Raddar, I think is the Backup/Restore Appdata plugin causing the database corruption. Wonder if there is a way to use external database fro Plex, lidarr, radarr and sonarr. Edited June 28, 20242 yr by LugoCloud
June 28, 20242 yr I've actually managed to get rid of the corruption. Not totally sure if it was an update or something I did. Although, last time I did a repair, I decided to delete the logs.db after the repair. Haven't had a single corruption in several months now. Not in Radarr, nor in Sonarr (previously had a corruption like every week on both systems).
July 11, 20241 yr I don't have a solution yet but I did add some monitoring for this issue recently. Hope this helps others. The below script leverages the User Scripts plugin so if your not familiar read up and install it first. It also uses the sqlite3 command line tool which I think may be built into Unraid but I'm not 100% sure on that. It was already installed for me. Set *arr backups to daily instead of weekly. (only needed so your not losing as much on restore) Settings > General > Backups Change the Interval to 1 days. Be sure to click the 'Show Advanced' button at the top or the "Backups" section won't be visible. Create an Unraid User Script that checks the Sonarr logs.db file for database corruption. #!/bin/bash result=$(sqlite3 /mnt/user/appdata/sonarr/logs.db "SELECT Count(*) FROM Logs WHERE Message LIKE '%database disk image is malformed%' AND Time >= datetime('now','-4 hours');") if [[ $result -gt 3 ]] then echo "Database corruption detected, sending notification" /usr/local/emhttp/webGui/scripts/notify -s "Sonarr corruption" -i "alert" -m "Please attempt to restore Sonarr from a known good backup! Don't forget to add any shows that were added since the backup." -d "Sonarr database corruption detected!" else echo "No corruption detected" fi With a Custom cron schedule to run every 4 hours (example below). 38 */4 * * * Feel free to adjust the script for you needs. It is easy to adapt this to radarr by changing the path to the logs.db file and then adjusting the echo and notify strings. You can change the schedule as well if you think every 4 hours is too aggressive. Adjust your User Script schedule accordingly. Adjust the SELECT statement in the script which is currently set to look back 4 hours. datetime('now','-4 hours') Edited July 30, 20241 yr by permster Adjusted script logic for better results
September 28, 20241 yr Glad I found this thread, have exactly the same problem and have been using your script above permster which has been very handy! Happens about once a month, just go back to the previous days backup and it works again....
January 8, 20251 yr Still having a nightmare with this. A couple of days ago I changed the filesystem to xfs from btrfs thinking that could be the issue, and it corrupted again today. I've also turned off all appdata backups, but that doesn't seem to make a difference and it still happens. I can't see any logs that seem to indicate what the issue could be. SMART test on the NVME drive said its all fine. The corruption doesn't seem to happen at a set time, theres potentially 4 or 5 different hours during the day/night that it happens (which I can roughly tell using permsters script above...) Running out of things to try before I start trying nuclear options...!
January 10, 20251 yr My next foray into this journey is upgrading Unraid to v7 - unsure if it will make a difference, but I've upgraded, and lets see what happens...!
January 18, 20251 yr On 1/10/2025 at 1:10 PM, lycrake said: My next foray into this journey is upgrading Unraid to v7 - unsure if it will make a difference, but I've upgraded, and lets see what happens...! How has V7 been treating you so far? I am having this issue a lot between my Radarr/Sonarr and my 2 4K instances as well. I suspect that it has to do with my docker backup script running but am not sure. Very frustrating and if you dare ask about it in the Sonarr/Radarr discord they tell you to read the FAQ which does help in getting *arr back up and running, but doesn't solve the root issue or prevent it from happening again.
January 18, 20251 yr So far so good, been 8 days and I haven't had the message as of yet - I'd usually get it after a couple of weeks, but it was as quick as every 3 or so days at one point, so not out of the woods yet... Yeah that was my process as well, in the end, against my better judgement I disabled all of the backup services I had running in docker and it still happened, so I ruled that out. I had exactly the same issue in the Sonarr/Radarr discord, they didn't want to know....
January 18, 20251 yr 4 hours ago, TheScrantonStrangler said: How has V7 been treating you so far? I am having this issue a lot between my Radarr/Sonarr and my 2 4K instances as well. I suspect that it has to do with my docker backup script running but am not sure. Very frustrating and if you dare ask about it in the Sonarr/Radarr discord they tell you to read the FAQ which does help in getting *arr back up and running, but doesn't solve the root issue or prevent it from happening again. I'm not running any backup script at all (although I have had it on my to-do list for far too long), and it happens to me every now and then (about once or twice a month). I have lived with this problem for years. No update what so ever of either Unraid neither any of the *arr applications have solved it. Haven't upgraded to Unraid 7 yet though.
January 27, 20251 yr I am a new UnRAID user who never used any version but 7 and this just happened to me. I hadn't yet set up backup scripts for my databases (but now I will!) and the corruption happened on one I just set up a few hours ago, so not much was lost. That said, I don't know what could have caused it, because I only have a single drive in my array while I migrate data off existing disks I want to incorporate later. So it's not the multi-disk install theory. I also don't really have any other processes running because I just set things up. I am just going to delete the appdata and reinstall fresh, but will keep a fresh eye on this thread since I know it is something that is likely to keep happening.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.