"Scan Library Files" is not adding (or removing) Movies

Server Version#: 4.139.0
Player Version#: I’m using Plex on the server itself with a Chrome web browser

Hi everyone,

I’ve been using Plex for a very long time and have never had an issue like this where I’ve been stuck. I added a movie today and hit “Scan Library Files” like I always do and the move didn’t appear. I took it out of the folder, rescanned, put it back in, rescanned. Still didn’t work. I took another movie out of the content folder and rescanned as an experiment and it didn’t remove that movie either, so something is weird.

I have restarted Plex and the computer several times. I went to the Troubleshooting section and clicked “Optimize Database” and “Clean Bundles” but neither of those helped.

Again, I’m out of ideas on how to fix this. Can anyone please help? Happy to answer any questions on things I may have omitted and I’ve uploaded the server logs below.

I very much appreciate any help you can offer. Thank you in advance!

FYI, 4.139.0 is the version of Plex Web. The version of Plex Media Server is listed further down, under the server name (Settings → Server_Name → General). Your server is running v1.41.0.8994.

Thanks for including the log files.

From Plex Media Server.log:

Sep 30, 2024 15:15:07.324 [0x700000a22000] ERROR - [DatabaseFixups] SQLITE3:(nil), 11, database corruption at line 68825 of [a29f994989]
Sep 30, 2024 15:15:07.324 [0x700000a22000] ERROR - [DatabaseFixups] SQLITE3:(nil), 11, database corruption at line 68975 of [a29f994989]
Sep 30, 2024 15:15:07.324 [0x700000a22000] ERROR - [DatabaseFixups] SQLITE3:(nil), 11, statement aborts at 7: [SELECT coalesce((SELECT max(blockid) FROM 'main'.'fts4_metadata_titles_icu_segments') + 1, 1)] database disk image is malformed
Sep 30, 2024 15:15:07.324 [0x700000a22000] ERROR - [DatabaseFixups] SQLITE3:(nil), 11, statement aborts at 172: [update metadata_items set extra_data=? where metadata_type=? and library_section_id=? and id=?] database disk image is malformed
Sep 30, 2024 15:15:07.325 [0x700000a22000] ERROR - [DatabaseFixups] Exception inside transaction (inside=1) (/System/Volumes/Data/data/actions-runner/_work/plex-media-server/plex-media-server/Library/MetadataCollection.cpp:525): sqlite3_statement_backend::loadOne: database disk image is malformed
Sep 30, 2024 15:15:07.325 [0x700000a22000] ERROR - [DatabaseFixups] Fixup 29DatabaseFixupsSyncCollections threw an exception: sqlite3_statement_backend::loadOne: database disk image is malformed

The server has database corruption.

Download and run the Plex DBRepair Utility: GitHub - ChuckPa/PlexDBRepair: Database repair utility for Plex Media Server databases

Use a MacOS terminal window to run it.

Stop PMS, then use the AUTO option to try repairing the database.

If it cannot repair the db, reply back to the thread with the output from the terminal window.

You can also try REPLACE. It will check the backup databases and use one of those if possible.

The README has additional information on how to use the tool.


This works on Linux. MacOS should be similar.

# Download latest version. 
# This overwrites any existing version.  Remove "-O DBRepair.sh" to not overwrite.
wget -O DBRepair.sh https://github.com/ChuckPa/PlexDBRepair/releases/latest/download/DBRepair.sh

# Make it executable
chmod a+x DBRepair.sh

# Run it
./DBRepair.sh
1 Like

@FordGuy61 You are my hero. I ran the Automatic option with the tool and it looks like it fixed it! Thank you so much for the quick reply and expertise, I really really appreciate it. I will bookmark that tool in case I need it again in the future. Do you have a tip jar?

1 Like

Glad you’re up and running. No tip jar. Just contribute to the forum occasionally. :slight_smile:

Cheers

1 Like

Ok well thank you so much for your help - I really appreciate it and I will try to pay it forward as best as I can.

1 Like

@FordGuy61 : Thank you for your kind assistance to others.

I have followed the instructions provided here, however, the database still do not want to be used by plex. It says that it is corrupted, but when I check with the DBRepair tool, it says it is ok (the first time it wasn’t ok, and it tried to fix, after the initial fix, it says the status is “OK”.)

It only happened recently when I upgraded from 1.40.5 to 1.41.0 and then 1.41.0 (newer than the previous one).

I do have a backup of the db in 1.40.5 somewhere (I think), so would you recommend me to go to that instead?

Best regards,

Dawie

Plex Media Server.1.log (1.5 MB)
Plex Media Server.2.log (5.8 MB)
Plex Media Server.log (1.7 MB)

@joubertdj For what it’s worth I also did the fix and almost immediately ran back into the same problem again. I went back and reverted the DB to an older version before the problem arose and that seems to have done the trick. I’d recommend, as @FordGuy61 did to me initially trying that.

Perfect, thanks. Let me try that …

… that worked … great!! Thanks @mmontecuollo

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