Broken search and no "include in dashboard" option

Server Version#: 1.22.3.4392

After some time away I tried search in my Plex libraries and found that it does not find anything. Googled, searched for solution, found advice to turn on the “include in dashboard” option. Problem is – there is no such option in Manage library=>Edit=>Advanced (or anywhere else for that matter). There is pulldown with 3 options Visibility:

  • Include in home screen and global search
  • Exclude from home screen
  • Exclude from home screen and global search
    I tried each, nothing changed, search does not work. To be exact, it searches everywhere: Movies & Shows - On Plex; Web Shows; Podcasts; Music - On TIDAL; but not in my libraries.

Congratulations to developers: with single move you’ve destroyed everything.

Your database might be damaged, so that there is no search index anymore.

  1. activate debug logging (not ‘verbose’!)
  2. quit Plex Server
  3. wait 1 minute
  4. start Plex Server
  5. wait 5 minutes
  6. fetch log files and attach them here

Or inspect them yourself. Take a look at the Plex Media Server.log file and seek for messages about database corrupt or malformed.

You are right, there are these lines in Plex Media Server.log:

May 11, 2021 03:17:59.828 [9572] ERROR - SQLITE3:0x26696943, 11, database corruption at line 87331 of [bf8c1b2b7a]
May 11, 2021 03:17:59.828 [9572] ERROR - SQLITE3:0x26696943, 11, statement aborts at 10: [delete from media_streams where media_item_id=?] database disk image is malformed
May 11, 2021 03:17:59.829 [9572] ERROR - Exception inside transaction (inside=1) (…\Library\MediaItem.cpp:812): sqlite3_statement_backend::loadOne: database disk image is malformed
May 11, 2021 03:17:59.829 [9572] WARN - Caught exception while scanning kino-all: sqlite3_statement_backend::loadOne: database disk image is malformed

How do I fix this?

It is a bit difficult at this time.
Since the addition of the new search index which supports more characters and translates things like & and and you cannot use the default sqlite3 tools to perform the repair procedure.
And an extended Plex server version which contains the necessary tools for the repair is not released yet.

At this moment, I can only offer you to try and repair your database over here, using my preview version of the server.
I must warn you however, that success is not guaranteed.
If you are OK with that,
shut down your server (important!) fetch the three files

com.plexapp.plugins.library.db
com.plexapp.plugins.library.db-shm
com.plexapp.plugins.library.db-wal

from your folder "%LOCALAPPDATA%\Plex Media Server\Plug-in Support\Databases"
zip them up
upload them to e.g. GDrive
and send me the download link

P.S.
you can improve the chances of success by including the backup versions of the main database file, which have filenames which follow this pattern:
com.plexapp.plugins.library.db-2020-05-31

[link removed]

List of files in directory Databases was slightly different, so I packed all of them:

com.plexapp.dlna.db
com.plexapp.dlna.db-shm
com.plexapp.dlna.db-wal
com.plexapp.plugins.library.blobs.db
com.plexapp.plugins.library.blobs.db-2021-05-03
com.plexapp.plugins.library.blobs.db-2021-05-06
com.plexapp.plugins.library.blobs.db-2021-05-09
com.plexapp.plugins.library.blobs.db-2021-05-12
com.plexapp.plugins.library.db
com.plexapp.plugins.library.db-2020-01-12
com.plexapp.plugins.library.db-2020-01-15
com.plexapp.plugins.library.db-2020-01-18
com.plexapp.plugins.library.db-2020-01-21

I didn’t really want the blobs DB files. That’s why I didn’t list them.

We can deduce from the dates on your backup copies that the DB has been damaged since about mid-January.

I have now performed the repair procedure on your file.
I had to remove one record of a movie, because it was a duplicate. So if there is one movie unplayable now, perform the Plex Dance with it.

  1. Shut down the server (using the task tray icon – very important!)
  2. Remove all files from the Databases folder, which have file names ending in
.db-shm
.db-wal
  1. Extract the zip file I’ve sent you and copy the contained files into the Databases folder, overwriting existing files.
  2. Start Plex server and wait several minutes before trying to do anything. The server has to regenerate some index tables during this time, which were removed during the repair.

Tips for preventing DB corruption in the future:

  • never, ever let the drive run “full” where the Plex data folder is located (i.e. by default that would be C:)
  • give your server a chance to perform its maintenance cycle, by either not shutting it down during the night, or setting the window for maintenance to a different time. Scheduled Tasks | Plex Support
  • don’t interrupt the server rudely, i.e. by removing the power cord or pressing the hard reset button. Strive for a regular shutdown of Plex, even if other processes on the computer have crashed.
  • if you have unreliable electrical power at your house, consider getting a UPS unit for your server computer.

Seems to be working now. Thank you very much for your help!

Unfortunately, my PMS computer regularly shows blue screen of death (Win10), so I should expect this to happen again, sooner or later. I will only hope that developers who destroyed the sqlite3 compatibility, will also provide the fixing tools soon enough.

The tools will be included in PMS version 1.23.1.xxx

You should investigate those bluescreens.
If they happen after long durations of transcoded playback, the cause is very likely an insufficient cooling system. Clean the cooling fans, air ducts, filters, and heat sinks.

If they happen more randomly and the computer is already a few years old, it may be the power source (can be swapped).
If you’re unlucky, it is caused by leaking capacitors on the mainboard. Swapping that out usually means replacing all the other electronics too.

Thanks for the advice. I’m reasonably sure it’s bad RAM stick, just need to take care of some more urgent stuff, then I’ll fix it.

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