Hoping for help with DB corruption

@ChuckPa Since this is happening to specific files, you got me thinking when asking about that (and about disk i/o). It turns out that every file that I’m having issues with is on one disk. Obviously, that disk is now totally suspect. It’s passing all SMART tests, but of course that means nothing.

@fly

If that’s the case, I recommend being proactive and start moving things off it HOWEVER keep those files separate from others (different dir) until you’re certain the files are OK.

1 Like

Yeah, I won’t have an extra 8TB until tomorrow, but that’s basically the plan.

Please keep me advised ?

Will do. I really appreciate your help here. Apologies that it seems that it doesn’t have anything to do with Plex.

So I was able to take my unRAID array offline and run an xfs_repair on every drive in the array. Once I rebooted everything, the problem seems to have disappeared. Yay-ish!

I’m still going to pull that drive as soon as my new drives arrive tomorrow.

Well I’m embarrassed to say that I think I have the answer, and it (of course) has nothing to do with Plex. It seems I had a bad USB Bluetooth receiver in the server that was somehow screwing everything up. Once I pulled it out, things went back to normal. That doesn’t make a lot of sense to me, but it is what it is…

There doesn’t appear to be anything wrong with the database. The drive I suspected to be bad is not. The only thing that fixed it was pulling that USB device. The UnRAID syslog led me to the issue. It was showing like 200,000 errors for the USB drive. However, I missed it because it doesn’t actually show 200,000 errors. It shows one error, and then the next line in the log says ‘Error repeated 200,000 times’.

Lesson learned.

1 Like

Hello,

Do you know the procedure for macOS?

I tried this :

/Applications/Plex\ Media\ Server.app/Contents/MacOS/Plex\ Media\ Server --sqlite

But all it did was launching the server, not the sqlite statement.
Am I missing something here?

Thanks!

@mattmatt

The embedded sqlite modules are a somewhat new addition to PMS-proper.

Which version do you have?

Also, Do you have database backup files in the Databases directory ?

Are you meaning sqlite3 module is not available within Plex Media Server macOS bundle yet?

I have version 1.22.3 on macOS. I also have database back-up files in the Databases directory.

@mattmatt

You should have the sqlite module in PMS

Is there something about how you’re invoking it? I’m not familiar enough with MacOS to know.

[chuck@lizum plexmediaserver.504]$ ./Plex\ Media\ Server --sqlite
SQLite version 3.26.0 2018-12-01 12:34:55
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> 
[chuck@lizum plexmediaserver.505]$ rpm -qa | grep -i plexm
plexmediaserver-1.22.3.4392-d7c624def.x86_64
[chuck@lizum plexmediaserver.506]$

Internet search shows:

open ./AppName.app --args -AppCommandLineArg

Is this relevant?

Thanks for the suggestion!

I tried but it has the same effect as my previous trials: it opens the app. The sqlite argument is not taken into account.

On macOS it’s (very strangely):

/Applications/Plex\ Media\ Server.app/Contents/MacOS/Plex\ Media\ Server sqlite

or

/Applications/Plex\ Media\ Server.app/Contents/MacOS/Plex\ Media\ Server sqlite ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db

2 Likes

@Volts

Thanks!

OMG only the two dashes are making the difference!

Thanks a lot for your help, it works very well.

image

It’s weird that the macOS binary doesn’t want dashes. Must be different tooling since macOS apps are “bundles”.

1 Like

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