Server not recognizing changes to libraries

Server Version#: 1.13.8.5395
Player Version#: 3.67.1
Mac-OS 10.13.6 (17G65)
Media stored on an external HDD connected via USB3, and used exclusively for the plex media.

Hello,

Long-time plex user, and only very recently have been having issues.

First issue worth mentioning, in case it’s somehow related, even though it’s already been resolved: About 2 months ago, the server had a database error. Essentially, server would load, but dashboard wouldn’t display and about half of my media wouldn’t play. Rebuilt and reinstalled everything, and all was good again.

Fast forward to this week, and I’ve started to notice a different problem that I can’t solve, even after scouring the forums and google.

I have several libraries linked to different folders with their respective media types, and it seems to affect all of them. Basically, the server isn’t recognizing any changes to the folders; not adding new media added to those folders, and also not recognizing that others have been deleted or moved.

This previously used to work fine, and I’m not sure what might have changed, other than I regularly update to the latest server version when available. I don’t play around with any of the server settings, at least since initially setting it up on this particular computer a couple years ago.

I’ve tried manual scans, auto-scans, repairing the database, deleting and reinstalling the app. Nothing seems to work.

The old files that I’ve deleted still show up in the library, although if I poke it enough it’ll eventually say the file is ‘unavailable’.

New files don’t appear at all. This doesn’t seem to be a filenaming issue, as even previously recognized files that have been moved to another folder fail to show the move.

I’d love to retain all of my existing metadata, and watched status if possible. So, trying to avoid completely deleting all the plex data… but if there is no other choice, I’d accept that fate. Hopefully, one of you has a solution, and can get it sorted without resulting to such drastic action.

Let me know if you need any logs, or what else to try before giving up.

Thank you in advance!

Anybody have any idea what to do?

Anybody? Sigh…

Thank you for the reply. I’ll get the logs when back at that computer.

However, I’ve already tried repairing the database (as per instructions on that page), and it did not solve the problem.

Any other suggestions, before I can supply the logs?

Thank you for your patience. I setup logging, restarted and tried to simulate the problem by:

Scanning Library Files
Empty Trash

Neither operation recognized the changes.

Looked at the logs briefly, but it’s way over my head. However, neither corrupt nor malformed appeared in the text.

Plex Media Server Logs_2018-10-10_15-07-29.zip (2.6 MB)

P.S. I did notice that plex was trying to refresh the metadata on one of the deleted files, and it appears to have a lot of entries in the log referencing that. But, I don’t really care about the metadata for a file I’ve removed from my library.

Hi Otto,

Any other suggestions?

I’ve uploaded the logs, and already repaired the database. What’s next?

in plex web @ https://app.plex.tv/desktop#

go to settings, scroll down the left side menu at the bottom should be console.

you can watch the log messages go by.

try scanning or do whatever and look for any sql errors.

if you have anything that says corrupt or malformed image, then it sounds like your database is broken.

if so, you could try to repair with the steps @ https://support.plex.tv/articles/201100678-repair-a-corrupt-database/

I would hazard a guess that the issue your externally attached drive is not suitable for the kind of disk io needed for plex database and metadata.

According to the initial post, the external drive is used for media storage - not the application data.

@Elil There is something wrong with your database (again), at least according to the logs you posted earlier.

Oct 10, 2018 03:12:34.418 [0x70000bc14000] DEBUG - There was a change for metadata item 131583 ([filename]), saving.
Oct 10, 2018 03:12:34.418 [0x70000bc14000] DEBUG - Updating metadata item (save) ([filename]) with ID 131583
Oct 10, 2018 03:12:34.420 [0x70000bc14000] ERROR - Failed to commit transaction (../Library/MetadataItem.cpp:927) (tries=1): Cannot commit transaction. SQL logic error or missing database
Oct 10, 2018 03:12:35.098 [0x70000bc14000] ERROR - SQLITE3:0x70000b9845b0, 1, statement aborts at 1: [COMMIT] cannot commit - no transaction is active
1 Like

Thank you for the quick reply!

I’ve already scanned the logs for ‘malformed’ and nothing shows up. Additionally, I’ve already repaired the database two times, and nothing changed.

I tried to use your console, and didn’t see ‘malformed’ either. But I did find the following error:

“Error
Thread
0x700001a0b000
Message
Unable to find client profile for device; platform=WebMAF, platformVersion=01.81, device=PlayStation 4, model=”

I do watch plex via that PS4, but it’s currently turned off, so not sure why it’s showing up as an error at the moment. Either way, that seems to be a single viewing platform out of the 3 in my house… and doesn’t seem to be server related either. I can view the media and see this old state of the server on all my platforms, and it also seems to recognize and save if I’ve watched something… just no changes with deleting files or adding new ones.

When trying to ‘empty the trash’ on a folder that I know contains files I’ve already deleted from the folder, I get this non-error:

“Level
Debug
Thread
0x700001988000
Message
Completed: [192.168.0.3:59184] 200 PUT /library/sections/10/emptyTrash (10 live) TLS GZIP 3ms 268 bytes (pipelined: 11)”

As a final test, I decide to delete one of my libraries, and ran into a new issue. It doesn’t delete. The library is still there after the “delete operation”, and a TON of errors showed up in console. Too many to copy, so I’ve attached a screenca to give you an idea.:

As far as the drive, it’s been the same for the last few years, and never had a problem until very recently.

Any other ideas?

I’m close to just deleting the entire app, and trying to start from scratch… but really didn’t want to lose the ‘watched’ data, fixed matches and some custom artwork. I’m also afraid I won’t delete everything somehow, and be stuck with the same issue and lose all the other data while I’m at it.

What output do you get from the commands under Check for Corruption in the Repair a Corrupt Database-guide?

Here is the whole sequence from Check through Repair. I did notice there is an error about half way down about no such index. Never noticed that before, but also didn’t look to hard. Perhaps this is the route of the problem? You can see for yourself here:

Last login: Thu Oct 18 14:44:10 on console

Adams-Mac-Pro-2:~ Adam$ cd ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/

Adams-Mac-Pro-2:Databases Adam$ cp com.plexapp.plugins.library.db com.plexapp.plugins.library.db.original

Adams-Mac-Pro-2:Databases Adam$ sqlite3 com.plexapp.plugins.library.db “DROP index ‘index_title_sort_naturalsort’”

Adams-Mac-Pro-2:Databases Adam$ sqlite3 com.plexapp.plugins.library.db “DELETE from schema_migrations where version=‘20180501000000’”

Adams-Mac-Pro-2:Databases Adam$ sqlite3 com.plexapp.plugins.library.db “PRAGMA integrity_check”

ok

Adams-Mac-Pro-2:Databases Adam$ cp com.plexapp.plugins.library.db com.plexapp.plugins.library.db.original

Adams-Mac-Pro-2:Databases Adam$ sqlite3 com.plexapp.plugins.library.db “DROP index ‘index_title_sort_naturalsort’”

Error: no such index: index_title_sort_naturalsort

Adams-Mac-Pro-2:Databases Adam$ sqlite3 com.plexapp.plugins.library.db “DELETE from schema_migrations where version=‘20180501000000’”

Adams-Mac-Pro-2:Databases Adam$ sqlite3 com.plexapp.plugins.library.db .dump > dump.sql

Adams-Mac-Pro-2:Databases Adam$ rm com.plexapp.plugins.library.db

Adams-Mac-Pro-2:Databases Adam$ sqlite3 com.plexapp.plugins.library.db < dump.sql

well, your db may not be physically corrupt, but with all those cannot commit errors, it looks like something is wacky internally.

if you want to further experiment, shut down plex server, rename the library.db and restart pms.

This will create a new database. if you have a library that has a smaller amount of media, I would scan it first (to test on something small and fast), and see if you still get the errors.

If you do, then some other db file may be messed up. if the errors go away, then that points directly to the old db.

You can try to decide what to do from there.

regarding your watched status, many people seem to recommend TRACKT, but you would need to setup an account there and get the plex plugin installed and working (with your old db obviously).

once your watch history is saved to trackt, you should be able to import it into a new db.

I haven’t used trackt myself, but I have been thinking about doing so, so I have a backup source of my watched history.

Backed up everything and tried it fresh. Added my smallest library and saw the correct changes right away. I guess the old DB is f’d… sigh. Quite possibly during the first time I had to rebuild the database. Oh well, at least I know it’s not worth trying to save.

Thank you for the advice on TRACKT. I’ll give that a look next, as I really don’t want to hunt down all the viewed statuses for my family of 5’s massive media library. That’ll at least be a good start to getting back up and running again.

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