Library cannot be deleted and scan does not work

Hello all,

I’m quite really unhappy with the latest release of PMS. I simply only have issues with.
Now my issue is when I’m going to my library Movies and see the view “library” instead of “recommended”, it says there is an error with the loading.

So I tried to delete my library Movies to start from 0, which is quite really stupid but seems there is no repair function. But I cannot delete.

In the log, I can see this:

Dec 29, 2019 11:06:54.889 [0x7f40ad40d700] ERROR - SQLITE3:(nil), 11, database corruption at line 79051 of [bf8c1b2b7a]
Dec 29, 2019 11:06:54.890 [0x7f40ad40d700] ERROR - SQLITE3:(nil), 11, statement aborts at 11: [SELECT idx, start_block, leaves_end_block, end_block, root FROM ‘main’.‘fts4_metadata_titles_segdir’ WHERE level = ? ORDER BY idx ASC] database disk image is malformed
Dec 29, 2019 11:06:54.890 [0x7f40ad40d700] ERROR - SQLITE3:(nil), 11, statement aborts at 91: [delete from metadata_items where library_section_id=?] database disk image is malformed
Dec 29, 2019 11:06:54.890 [0x7f40ad40d700] ERROR - Exception inside transaction (inside=1) (…/Library/Scanner/LibrarySection.cpp:394): sqlite3_statement_backend::loadOne: database disk image is malformed
Dec 29, 2019 11:06:54.892 [0x7f40ad40d700] ERROR - Thread: Uncaught exception running async task which was spawned by thread 0x7f40cc437700: sqlite3_statement_backend::loadOne: database disk image is malformed

What does means “database” base disk image is malformed?

What I can do to resolve this?

Thanks

It means your database has become corrupted somehow. You can try to repair it using the procedure in this support article:

I will try but the procedure is inaccurate. Step 6 does not work:

PS Z:\Library\Application Support\Plex Media Server\Plug-in Support\Databases> .\sqlite3.exe com.plexapp.plugins.library.db < dump.sql
Au caractère Ligne:1 : 46

  • .\sqlite3.exe com.plexapp.plugins.library.db < dump.sql
  •                                          ~
    

L’opérateur « < » est réservé à une utilisation future.
+ CategoryInfo : ParserError: (:slight_smile: , ParentContainsErrorRecordException
+ FullyQualifiedErrorId : RedirectionNotSupported

So I cannot repair… and starting from scratch is simply a big big waste of time.

Only if you don’t want to fix it.

I want to repair it to avoid loosing all my times to start all over.

A fresh Install can be a good thing, yes time consuming but over time software leaves crumbs. Those Crumbs can be a real pain.
As your a Windows user I gather, you should realize it’s a step in the right direction.

I will try the repair first and otherwise, I will starting from scracth.
My concerns is simply I have to readd all the users, my config etc…

I hear you, it’s a pain. Good luck.

Finally the repair procedure does not work. Plex employee should take a look but the step 6 does not work. It creates a .db file of 0k even if the dump is like 20Mb.

I used the backup instead from this:

You could also try using one of your earlier database backups, if they exist (they do by default). Have a look in the same directory as your database; you should see some files with the same name, but with a date appended (e.g. com.plexapp.plugins.library.db-2019-12-19). Make sure PMS is stopped and then try renaming one of your earlier backups (after saving a copy of your existing one, which you should have from the earlier procedure). Then start PMS and see if it functions normally. You should have 3-4 backups with which to test. If that doesn’t work, you can try the repair procedure on one of the backups. The earliest backup should be from ~10 days ago and may be the best place to start. Assuming the corruption occurred recently, it would be the one least likely to be badly damaged.

I think I have a similar issue. I have two data bases in my setup one smaller and one bigger. The bigger one can I all of a sudden not access my library but I can still connect to files in my collections and from the recommended tab. How do I even fins the repair function?

I tried using this the solution mentioned above but it didn’t help. :frowning:

Tried this as well couldn’t get the commands to work though.

I don’t think this syntax is gonna work. What’s with the dotslash before the sqlite3.exe ? Isn’t that an instruction to go up one folder level?
Try again on a non-remote drive, with the sqlite executables and the database file all in one folder.

Remember: Make sure that Plex server is not running when copying the file.

I have just performed the repair steps with my own database (338 MB), using the latest download from the sqlite website. They do work.

First, I did it through PowerShell and explain the syntax with the ..
I tried again from a “cmd” and the step 6 does not work.

In any cases, my issue is resolve with the backup but I don’t understand why step 6 does not work.

Using the backup is probably your better solution (same as me). Good luck.

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