Step- By-Step How to Rebuild Subsonic Database?

Need help? Post your questions here.

Moderator: moderators

Step- By-Step How to Rebuild Subsonic Database?

Postby dgood54 » Fri Oct 21, 2016 11:30 pm

I believe I have a corrupt dbase and need to rebuild it. I've seen post after post of people recommending people to rebuild their dbase but I'm not finding the details for how to do that, at least to any degree that I'm following.

I NEED my Subsonic just like we used to need our MTV. Yeah, it ain't working. Help!
dgood54
 
Posts: 9
Joined: Sun Mar 11, 2012 1:08 am

Re: Step- By-Step How to Rebuild Subsonic Database?

Postby dgood54 » Sat Oct 22, 2016 4:14 am

Okay, the reason I wanted instructions for rebuilding my Subsonic database was I was seeing a lot of indications of a corrupted database and I couldn't find any clear instructions for rebuilding.

There were many signs that my dBase was corrupted but I ended up going to my C drive, finding the "db" folder under Subsonic (C:/subsonic) and moving the files within that folder elsewhere in case I needed to restore them.

I then went to the web interface via http://localhost:4040 (4040 or whatever port you have set for your access). My original login credentials still worked.

Anyway, once there, I went into Settings-->Media folders. The media folders I had had Subsonic pointing to were now gone so I re-entered those and then did the "Scan media folders now" operation. The scanning countdown showed the scanning was working, but things still didn't behave correctly. Note: Also gone were all Users, by the way.

Kept fiddling around trying different things. Eventually, and at wits' end, I tried deleting and then re-entering the media folders again (exactly as they had been entered before) and, voila! All my music suddenly showed up, without even rescanning (??)

So, in the end, I don't know if any of this will be the solution for anyone else, but somehow it was for me.

Good luck!

P.S. I still haven't seen clear instructions for rebuilding the dBase, but perhaps my haphazard approach (clearing the Subsonic db folder on my C drive of any files and then rescanning from the web interface) is the way (?).
dgood54
 
Posts: 9
Joined: Sun Mar 11, 2012 1:08 am

Re: Step- By-Step How to Rebuild Subsonic Database?

Postby MikeLegit » Sat Nov 05, 2016 5:21 pm

My DB is corrupting nearly daily and I agree. There isn't any good recovery unless you have a backup, and that backup could have corrupt data. Otherwise you start over and try to enter your settings one-by-one. PITA! :roll:
This forum is blocking my ISP with their aggressive filtering, so I can only login via my phone. After all my contributions (and more than 2X the recommend donation), the site admin is unwilling to help. You can find me at SmallNetBuilder Forums.
MikeLegit
 
Posts: 43
Joined: Mon Apr 01, 2013 2:18 pm

Re: Step- By-Step How to Rebuild Subsonic Database?

Postby toolman » Sat Nov 05, 2016 8:54 pm

I'm running 2 Subsonic servers since nearly 3 years now and I never had a corrupt database.
Server 1: 4.026 artists 9.615 albums 33.935 songs 129,42 GB
Server 2: 2.370 artists 10.302 albums 141.838 songs 1190,85 GB
Allthough I admit that recovering all your settings isn't easy, it's not that Subsonic's database is that buggy that wou have to recover almost on daily basis.
toolman
 
Posts: 538
Joined: Fri Dec 11, 2009 4:18 pm
Location: Netherlands

Re: Step- By-Step How to Rebuild Subsonic Database?

Postby MikeLegit » Sat Nov 05, 2016 9:21 pm

It's something in the metadata of my music that is crashing it. How else do you explain two different installations that I've had over 3 years both failing now? I have crashplan so I restore the database back to earlier this summer, it works for a day and then corrupts again. There is no way two independent installs can fail at the same time and has to be in the metadata.
This forum is blocking my ISP with their aggressive filtering, so I can only login via my phone. After all my contributions (and more than 2X the recommend donation), the site admin is unwilling to help. You can find me at SmallNetBuilder Forums.
MikeLegit
 
Posts: 43
Joined: Mon Apr 01, 2013 2:18 pm

Re: Step- By-Step How to Rebuild Subsonic Database?

Postby toolman » Sat Nov 05, 2016 10:06 pm

So, actually you're saying that something in the tags of your music is causing the corruption of the database.
I know that a lot of my music files are very badly tagged with ridicoulous comments, weird genres like OldiesInstrumental, and strange yeartags like 02062006.
None of this has ever caused a corruption on either of my databases.
Perhaps there's a problem with your files or your filesystem. Did you ever check your drives for errors?
toolman
 
Posts: 538
Joined: Fri Dec 11, 2009 4:18 pm
Location: Netherlands

Re: Step- By-Step How to Rebuild Subsonic Database?

Postby madhusker » Sun Nov 06, 2016 6:47 am

I had checked fs and all good. I was able to restore a backup, but it corrupts right after a new scan. I saw some errors in the logs related to podcasts, so I restored the db, immediately deleted all podcast subscriptions before it scanned, and thus far I made it through the scan and 5 hours. I haven't changed any podcast subscriptions for 2 years...weird. We'll see if it stays stable a few days before I call this solved.
madhusker
 
Posts: 49
Joined: Tue Dec 27, 2011 2:38 am

Re: Step- By-Step How to Rebuild Subsonic Database?

Postby madhusker » Sun Nov 06, 2016 5:15 pm

MikeLegit, let us know if removing podcasts like I did helps you out. My database has been corrupting too, and I've been about ready to setup a cron job to auto replace the DB with the backup and restart the service every couple of days. Chaps my A when I reboot the server and subsonic is dead. In my case, the database would corrupt, but still run ok until either the service was restarted, or the machine was rebooted. Once corrupt, the service starts and runs what appears to be normal, but you get the 503 error on the front page. As mentioned above, I removed all podcasts and have restarted the service several times successfully since doing that. Might be a fix for you too.
madhusker
 
Posts: 49
Joined: Tue Dec 27, 2011 2:38 am


Return to Help

Who is online

Users browsing this forum: No registered users and 11 guests