Can't Add or Remove Items

Server Version: 4.61.2

The other night I noticed that when I add videos into the folder being monitored that it wasn’t importing into Plex. So I tried to remove the Library and then create a new one. That would not work either so I tried Movies, TV Series and Other for 3 different libraries. None of them would allow the files to be added. Then I tried to remove the Libraries and it will not remove the Libraries. I have been using Plex for a very long time and have a very large amount of Movies, TV Series and POD Casts. Can someone please help me figure out what is going on here?

Thanks in advance
Mike aka STretch

Could you share your server logs here, please?
From the ring of it this could imply some database corruption or another substantial hiccup in your setup. The logs should show that.

Here are the logs and thank you for the help.
Plex Media Server Logs_2021-07-19_20-34-51.zip (4.4 MB)

You’ve database corruption:

Jul 19, 2021 19:40:15.385 [2188] ERROR - SQLITE3:0xd1d4049b, 779, index corruption at line 91877 of [1b256d97b5]
Jul 19, 2021 19:40:15.385 [2188] ERROR - SQLITE3:0xd1d4049b, 779, statement aborts at 12: [DELETE FROM 'main'.'fts4_metadata_titles_icu_segdir' WHERE level = ?] database disk image is malformed
Jul 19, 2021 19:40:15.385 [2188] ERROR - Exception loading item 'Mindhunter' from bundle: sqlite3_statement_backend::loadOne: database disk image is malformed

When the database is corrupt, you’ve three choices: repair, restore from a backup, or delete & start over.

If you delete the database you will have to re-create your libraries and re-share them with any users. Your media is not touched during the process.

If you’ve a backup of the database you can try restoring it. If the backup is not corrupt, you can then re-scan your libraries to pick up any additions since the date of the backup.

You can also try repairing the database.

These support articles have additional information:

1 Like

Thank you for your reply. I tried to repair the database and after it completes it is still doing the same thing. When I ran the command

“C:\Program Files (x86)\Plex\Plex Media Server\Plex SQLite.exe” com.plexapp.plugins.library.db “PRAGMA integrity_check”

Output is as follow

E:\Plex Media Server\Plug-in Support\Databases>“C:\Program Files (x86)\Plex\Plex Media Server\Plex SQLite.exe” com.plexapp.plugins.library.db “PRAGMA integrity_check”
*** in database main ***
On tree page 81385 cell 62: 2nd reference to page 80930
row 6054 missing from index index_activities_on_started_at
row 6131 missing from index index_activities_on_started_at
wrong # of entries in index index_activities_on_started_at
row 28 missing from index sqlite_autoindex_fts4_metadata_titles_icu_segdir_1
wrong # of entries in index sqlite_autoindex_fts4_metadata_titles_icu_segdir_1

E:\Plex Media Server\Plug-in Support\Databases>“C:\Program Files (x86)\Plex\Plex Media Server\Plex SQLite.exe” com.plexapp.plugins.library.db “.output recover.out” “.recover”

E:\Plex Media Server\Plug-in Support\Databases>

I would really like to save my watched, users and playlists. With this not being completely crashed yet, is there a way of exporting those settings then I can reinstall. With me using it for so long it will be a real PITA to redo the entire thing.

Thanks in advance.

I am willing to do whatever I need to get it repaired and working correctly. I have backups that run nightly from Plex then I have a Image Backup of the Server it is running on. I am willing to pay to have someone fix this too.

Pull the log file and see if the database still shows errors.

Unzip the file and look in Plex Media Server.log.

If you still see the error, then the repair did not work for some reason.

You can try the manual repair, or replace the database with one of your backups.

If you no longer see the database corruption messages, but still cannot add or remove items, then something else is happening. Post another set of log files and we can take a look.

Restored Database to previous update and it looks to be working. I will let it run tonight and then update.

Thanks for help

1 Like

Wanted to make sure I updated the post.

I have successfully updated to the latest version of Plex (1.23.5.4841) and tested the removing / adding directories / files. It is working perfectly now. I had a image backup that I run nightly on my server and restore my database file by stopped Plex Media Server then restore file com.plexapp.plugins.library.db that is located in \Plex Media Server\Plug-in Support\Databases. Started the server back up and everything worked like a charm.

I wanted to say thank you to support for trying to help me. I highly recommend everyone backup the databases on a regular schedule. Not sure how I screwed the database up but it was corrupted and my backup saved my butt.

Thanks,

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