Server Version#: 1.18.2.2015
Player Version#: All of them
I needed to replace a bad episode of series, I have done this multiple times in the past. I deleted the file from my Window Server and copied in the new file. Generally Plex will automatically recognize the change and I can test the new file. It didn’t notice any change so I did a Scan of the Library files manually. It ran without issue and still the old file is being shown in the library season but now it says Deleted.
I tried cleaning the bundles, emptying the trash, optimized the database. Nothing made a difference. I then decided to move the ENTIRE series out of the directory and Scan the library, the Series remained in the library exactly how it has been the entire time. I then tried moving a totally different series just to see if it would recognize the change, it didn’t! I then put in a new episode into a 3rd series to see if that would be recognized… it was! So clearly the issue is not adding anything brand new, it is removing something from the TV Shows area of the database.
I ran a test on my Movies database, moved a movie out of the directory ran a Scan. The Movie metadata remained just as the TV Series remained, the Movie shows Unavailable where it should have removed the Movie entirely. I put the files back, run a Scan and the movie is back to normal.
Or inspect them yourself. Take a look at the Plex Media Server.log file and seek for messages about database corrupt or malformed.
If you find these, you may have to repair your database.
May 14, 2020 10:04:49.604 [10932] ERROR - SQLITE3:0x18ea0b01, 11, database corruption at line 87331 of [bf8c1b2b7a]
May 14, 2020 10:04:49.604 [10932] ERROR - SQLITE3:0x18ea0b01, 11, statement aborts at 10: [DELETE FROM 'main'.'fts4_metadata_titles_segdir' WHERE level = ?] database disk image is malformed
May 14, 2020 10:04:49.604 [10932] ERROR - SQLITE3:0x18ea0b01, 11, statement aborts at 82: [delete from metadata_items where id=?] database disk image is malformed
May 14, 2020 10:04:49.604 [10932] ERROR - Exception inside transaction (inside=1) (..\Library\MetadataItem.cpp:778): sqlite3_statement_backend::loadOne: database disk image is malformed
May 14, 2020 10:04:49.604 [10932] ERROR - Exception inside transaction (inside=1) (..\Library\MediaItem.cpp:773): sqlite3_statement_backend::loadOne: database disk image is malformed
I apologize, I do not speak German. I used Google translate, I understand kaputt… means broken.
The other line Was für ein Typ Laufwerk ist P: ? Is this something about my storage? The translate said something about flash drives or something. Not certain what you are asking.
I am running Windows Server and have Drivepool running on the server for my entire Pool. No issues with that at all. All of the drives are working without any errors.
My mistake ! That’s what you get for jumping around between english and german threads all the time.
So drive letter P: is your drive pool?
I was pretty certain that did create some issues in the past, but not with the database but with missing cover art and posters.
Ideally, I recommend to use a dedicated (internal) SSD for the Plex data folder. But if it worked for a long time with your drive pool, you might as well continue to do it, after you repaired your database.
But keep an eye on the log files, in case damage is re-occuring. The sooner you catch it, the higher are the chances of a successful repair.
If it keeps on breaking, you might have to move away from the pool for the Plex data folder.
The P: is the Plex database drive. I set aside a physical drive for that and named it P for Plex. lol This drive is outside the drive pool. My Drive Pool is D:
I totally understand being in the wrong place and answering like that.
I guess I will be performing a database repair later today.
Otto, the instruction don’t tell me how to make the database readonly. I am getting an error when trying steps 2-4:
Error: attempt to write a readonly database
Nothing in the instructions makes any mention of making the database read/write. I can’t even find how to do that if it is needed. I removed the Read only for the directory where the database is located, that didn’t do anything.
I was able to get through all of the database repair steps, made zero difference. That TV Series is not in the TV Show folder and it will not leave Plex. Still there even though none of the media is available.
I tried adding a new movie and it won’t show in Plex.
What would I have to do then? What parts can I save? Can I save everyone’s watched data? What about all of my custom metadata, customized home movie configurations, custom images, collections, etc?Plex Media Server Logs_2020-05-15_10-41-54.zip (6.0 MB)
If these are the most recent lines (compare the time stamp with your local time please)
then I’m afraid the damage hasn’t been repaired:
May 15, 2020 10:41:36.776 [6588] ERROR - SQLITE3:0xb40c7989, 11, database corruption at line 87331 of [bf8c1b2b7a]
May 15, 2020 10:41:36.776 [6588] ERROR - SQLITE3:0xb40c7989, 11, statement aborts at 10: [DELETE FROM 'main'.'fts4_metadata_titles_segdir' WHERE level = ?] database disk image is malformed
May 15, 2020 10:41:36.776 [6588] ERROR - Failed to commit transaction (..\Library\MetadataItem.cpp:986) (tries=1): Cannot commit transaction. database disk image is malformed
May 15, 2020 10:41:36.776 [6944] DEBUG - Collection: Refreshed visibility in section 16 in 2ms.
This may mean that you’ll have to re-do your Plex libraries.
Wanted to follow up on this. I reran the database repair and this time it fixed the issues and I am able to add/delete media and the database is acting properly.