I’m running two instances of Plex Media Server on this Unraid host. Both use plexinc/pms-docker provided container.
That makes sense.
It happens because Metadata Refresh clears the FTS tables.
The need to “rebuild”. It does take some time to complete if PMS is running.
I do it as part of the FTS rebuild procedure when running “repair” operation.
-
Repair the DB
-
Pull the list of Triggers and Indexes from the source DBs. Create fresh in the new using that source list. If any are missing, report and add what’s missing.
-
Pull the list of FTS tables from the source DBs. Create fresh in the new using that source list. If any are missing , report and add what’s missing.
-
Tell FTS to “rebuild” (repopulate itself from all the other metadata in the DB)
-
Perform final DB checks (full depth) of both databases.
-
If both are perfect, promote to live status.
Indeed. I only mention it as a possible explanation for the behavior @StephenH described above (FTS4 table corruption between runs). Though it seems their server was only up for a short time, so probably unlikely.
At any rate, great job on the new utility. In my (admittedly limited) testing on a native Ubuntu Linux installation, it seems to work well and is very performant.
I had used a dummy Blobs DB because I didn’t have his.
Now that I have his, I see the size issue and suspect that’s where the problem is.
If true, then I have omitted something which will also get fixed immediately.
( some users have really ‘janky’ DBs haha )
Well you DID want real-world testing …
Be careful what you wish for!
![]()
![]()
Oh no! You mean you’re actually TESTING it ?
![]()
All said, I’m really pleased with how well this is turning out so far.
To go from 3000 lines of BASH shell script to over 7000 lines of C, where I had to write equivalent functions for all the BASH commands and Sqlite, a completely new method of working on the databases, plus added functionality, , I’m really happy with how it’s working at this point.
It did surprise me the first build. It actually ran a Check of the databases and didn’t ![]()
Hi @ChuckPa,
I just downloaded and tested v0.1999.03 and it still shows me the same error as .02:
Database Repair Utility for Plex Media Server (Windows)
Version 0.1999.03 (Jul 19 2026)
Select
1 - 'stop' - Stop PMS.
3 - 'check' - Perform integrity check of database and FTS indexes.
4 - 'vacuum' - Remove empty space from database without optimizing.
5 - 'repair' - Repair/Optimize databases.
6 - 'reindex' - Rebuild database indexes.
7 - 'start' - Start PMS
10 - 'show' - Show logfile.
11 - 'status' - Report status of PMS (run-state and databases).
12 - 'history' - Show command history of this session.
13 - 'revert' - Revert DBs to immediately before history index.
21 - 'prune' - Remove old image files from PhotoTranscoder cache & all temp files left by PMS.
42 - 'ignore' - Ignore duplicate/constraint errors.
98 - 'quit' - Quit immediately. Keep all temporary files.
99 - 'exit' - Exit with cleanup options.
Enter command # -or- command name (4 char min) : 1
PMS already stopped.
Select
1 - 'stop' - Stop PMS.
3 - 'check' - Perform integrity check of database and FTS indexes.
4 - 'vacuum' - Remove empty space from database without optimizing.
5 - 'repair' - Repair/Optimize databases.
6 - 'reindex' - Rebuild database indexes.
7 - 'start' - Start PMS
10 - 'show' - Show logfile.
11 - 'status' - Report status of PMS (run-state and databases).
12 - 'history' - Show command history of this session.
13 - 'revert' - Revert DBs to immediately before history index.
21 - 'prune' - Remove old image files from PhotoTranscoder cache & all temp files left by PMS.
42 - 'ignore' - Ignore duplicate/constraint errors.
98 - 'quit' - Quit immediately. Keep all temporary files.
99 - 'exit' - Exit with cleanup options.
Enter command # -or- command name (4 char min) : 3
Checking the PMS databases...
PMS main database is damaged.
PMS blobs database is damaged.
Main DB: Missing FTS index 'spellfix_metadata_titles' - MISSING
Main DB: Missing FTS index 'spellfix_tag_titles' - MISSING
Main DB: Missing FTS index 'fts4_metadata_titles' - MISSING
Main DB: Missing FTS index 'fts4_tag_titles' - MISSING
Main DB: Missing FTS index 'locations' - MISSING
Main DB: Missing FTS index 'fts4_metadata_titles_icu' - MISSING
Main DB: Missing FTS index 'fts4_tag_titles_icu' - MISSING
No FTS tables found in Main (C:\Users\tobia\AppData\Local\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db)
Blobs DB: Missing FTS index 'spellfix_metadata_titles' - MISSING
Blobs DB: Missing FTS index 'spellfix_tag_titles' - MISSING
Blobs DB: Missing FTS index 'fts4_metadata_titles' - MISSING
Blobs DB: Missing FTS index 'fts4_tag_titles' - MISSING
Blobs DB: Missing FTS index 'locations' - MISSING
Blobs DB: Missing FTS index 'fts4_metadata_titles_icu' - MISSING
Blobs DB: Missing FTS index 'fts4_tag_titles_icu' - MISSING
No FTS tables found in Blobs (C:\Users\tobia\AppData\Local\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.blobs.db)
NOTE: FTS indexes are damaged but main database structure is OK.
Use 'repair' (option 5) to rebuild.
Checking the PMS databases... complete.
Select
1 - 'stop' - Stop PMS.
3 - 'check' - Perform integrity check of database and FTS indexes.
4 - 'vacuum' - Remove empty space from database without optimizing.
5 - 'repair' - Repair/Optimize databases.
6 - 'reindex' - Rebuild database indexes.
7 - 'start' - Start PMS
10 - 'show' - Show logfile.
11 - 'status' - Report status of PMS (run-state and databases).
12 - 'history' - Show command history of this session.
13 - 'revert' - Revert DBs to immediately before history index.
21 - 'prune' - Remove old image files from PhotoTranscoder cache & all temp files left by PMS.
42 - 'ignore' - Ignore duplicate/constraint errors.
98 - 'quit' - Quit immediately. Keep all temporary files.
99 - 'exit' - Exit with cleanup options.
Enter command # -or- command name (4 char min) : 5
--- Processing Main DB ---
ERROR: Failed to open Dest DB.
ERROR: Main DB Extraction/Repair failed.
--- Processing Blobs DB ---
ERROR: Failed to open Dest DB.
ERROR: Blobs DB Extraction/Repair failed.
ERROR: Both pipelines failed or were skipped. Aborting file swap.
Select
1 - 'stop' - Stop PMS.
3 - 'check' - Perform integrity check of database and FTS indexes.
4 - 'vacuum' - Remove empty space from database without optimizing.
5 - 'repair' - Repair/Optimize databases.
6 - 'reindex' - Rebuild database indexes.
7 - 'start' - Start PMS
10 - 'show' - Show logfile.
11 - 'status' - Report status of PMS (run-state and databases).
12 - 'history' - Show command history of this session.
13 - 'revert' - Revert DBs to immediately before history index.
21 - 'prune' - Remove old image files from PhotoTranscoder cache & all temp files left by PMS.
42 - 'ignore' - Ignore duplicate/constraint errors.
98 - 'quit' - Quit immediately. Keep all temporary files.
99 - 'exit' - Exit with cleanup options.
Enter command # -or- command name (4 char min) : 10
Displaying Session Log: C:\Users\tobia\AppData\Local\Plex Media Server\Plug-in Support\Databases\DBRepair.log
------------------------------------------------------------
2026-07-20 07.02.24 - ============================================================
2026-07-20 07.02.24 - Session start. Mon Jul 20 07:02:24 2026
2026-07-20 07.02.24 - ============================================================
2026-07-20 07.02.33 - CheckDB - Unable to open DB 'C:\Users\tobia\AppData\Local\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db'.
2026-07-20 07.02.33 - Check - Check C:\Users\tobia\AppData\Local\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db DB - FAIL
2026-07-20 07.02.33 - CheckDB - Unable to open DB 'C:\Users\tobia\AppData\Local\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.blobs.db'.
2026-07-20 07.02.33 - Check - Check Blobs DB - FAIL
2026-07-20 07.02.33 - Check - FAIL
2026-07-20 07.02.33 - Check - CheckFTS Main DB - START
2026-07-20 07.02.33 - Main DB: FTS Check: Check - MISSING
2026-07-20 07.02.33 - Main DB: FTS Check: Check - MISSING
2026-07-20 07.02.33 - Main DB: FTS Check: Check - MISSING
2026-07-20 07.02.33 - Main DB: FTS Check: Check - MISSING
2026-07-20 07.02.33 - Main DB: FTS Check: Check - MISSING
2026-07-20 07.02.33 - Main DB: FTS Check: Check - MISSING
2026-07-20 07.02.33 - Main DB: FTS Check: Check - MISSING
2026-07-20 07.02.33 - Check - FTS Check - No FTS tables found
2026-07-20 07.02.33 - Check - CheckFTS Blobs DB - START
2026-07-20 07.02.33 - Blobs DB: FTS Check: Check - MISSING
2026-07-20 07.02.33 - Blobs DB: FTS Check: Check - MISSING
2026-07-20 07.02.33 - Blobs DB: FTS Check: Check - MISSING
2026-07-20 07.02.33 - Blobs DB: FTS Check: Check - MISSING
2026-07-20 07.02.33 - Blobs DB: FTS Check: Check - MISSING
2026-07-20 07.02.33 - Blobs DB: FTS Check: Check - MISSING
2026-07-20 07.02.33 - Blobs DB: FTS Check: Check - MISSING
2026-07-20 07.02.33 - Check - FTS Check - No FTS tables found
2026-07-20 07.02.42 - Repair - START
2026-07-20 07.02.42 - Repair - FAIL - Main DB Repair
2026-07-20 07.02.42 - Repair - FAIL - Blobs DB Repair
2026-07-20 07.02.42 - Repair - ABORTED - Pipeline Failures
------------------------------------------------------------
My Plex is running on a Windows 10 machine, latest Windows updates and drivers. Plex (64bit) is installed as a service using PMS Service 1.2.3.0. The path mentioned in the error message is available, Plex is shut down. I already restarted the host while disabling the service, so no process should lock the DB files.
Any idea, why this is happening?
I just found the “config”-command:
Enter command # -or- command name (4 char min) : config
--- [ DBRepair: Host Configuration Dump ] ---
Version: [0.1999.03]
Os [2]
Uid / Gid [0:0]
Username [tobia]
Home Directory: [C:\Users\tobia]
Host Type: [Windows]
Distro Name: []
Time Stamp: [2026-07-20_07.46.46.024]
Last User: [None]
Last Run: [Never]
Manual Config: No
Root Required: No
Scripted Mode: No
Ignore Errors: No
Remove Duplicates: No
Fail Status: No
Global Damaged: No
--- Main Database ---
Path: [C:\Users\tobia\AppData\Local\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db]
Checked: No
Damaged: No
Checked FTS: No
FTS Damaged: No
Bloated: No
Fragmented: No
--- Blobs Database ---
Path: [C:\Users\tobia\AppData\Local\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.blobs.db]
Checked: No
Damaged: No
Checked FTS: No
FTS Damaged: No
Bloated: No
Fragmented: No
Owner UID/GID: 0:0
Default Perms: 0644
Stat Format: [-c]
Stat Bytes: [%s]
Stat Perms: [%a]
Package Dir: []
SQLite Version: [3.53.0]
App Support Dir: [C:\Users\tobia\AppData\Local]
Database Dir: [C:\Users\tobia\AppData\Local\Plex Media Server\Plug-in Support\Databases]
Database Temp Dir: [C:\Users\tobia\AppData\Local\Plex Media Server\Plug-in Support\Databases/dbtmp]
Main DB Path: [C:\Users\tobia\AppData\Local\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db]
Blobs DB Path: [C:\Users\tobia\AppData\Local\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.blobs.db]
Cache Dir: [C:\Users\tobia\AppData\Local\Plex Media Server\Cache\PhotoTranscoder]
Log File: [C:\Users\tobia\AppData\Local\Plex Media Server\Plug-in Support\Databases\DBRepair.log]
Pid File: [C:\Users\tobia\AppData\Local\Plex Media Server\plexmediaserver.pid]
Temp Dir (Local): [C:\Users\tobia\AppData\Local\Temp]
System Temp: [C:\Users\tobia\AppData\Local\Temp]
Sqlite3 Cache Size [0]
Sqlite3 Page Size [0]
DBRepair Notify Cmd []
Pidof Utility: [pidof]
FTS Query: [SELECT name FROM sqlite_master WHERE sql LIKE '%FTS%';]
Have Start/Stop: (Yes)
Start Command: [cmd /c start "" "C:\Program Files\Plex\Plex Media Server\Plex Media Server.exe"]
Stop Command: [TASKKILL /F /IM "Plex Media Server.exe" >nul 2>&1]
--- Stack State ---
Stack Top: [0]
Stack Count: [0]
(No History to show.)
------------------------------------------------------
All the paths look valid and are available.
The DB is almost 12 years old and there are a lot of media files in my collection, so the size of the Db files should be ok.
-
I do not know what “Plex Service 1.2.3.0” is.
Which PMS version are you using ? 1.42.x or 1.43.x ? -
Please open the registry and look at:
-
HKEY_LOCAL_MACHINE\Software\Plex, Inc.\Plex Media Server -
Share the value of
InstallFolderif it exists -
HKEY_CURRENT_USER\Software\Plex, Inc.\Plex Media Server -
Share the value you find here (if it exists).
-
I suspect I am not correctly handling customized installation directories correctly for Windows. This is obviously a hard-failure.
With the data you provide, I’ll find the problem, fix it, and also strengthen the HostConfig() code to stop immediately if it can’t find the databases. This will prevent all the messy errors.
I do see a / in your pathnames. It should be \. Windows claims to be able to use either \ or /, Perhaps it doesn’t on Windows 10 ?
As I look at this in the VM (which works), I’m trying to find out what’s missing.
Thanks for taking care @ChuckPa
PMService is this project, that allows Plex to be installed as a service on Windows: cjmurph/PmsService: Plex Media Server service wrapper for windows
The service wrapper is running in the context of my account, no service user account involved.
PMS is version 1.43.3.10828 (latest)
The installation folder is standard for 64bit applications. I’ve never fiddled with the installation path. The path to data folder is standard as well.
![]()
![]()
I also noted that Database Temp Dir has a / instead of \ but I guess that path is generated in code. On the other hand it’s handled correctly. If I put it into the address bar in Windows Explorer the folder is accessible.
Thank you.
I’m looking at is again in the VM.
I’ve not used Windows in over 20 years.
My lack of knowledge is being an issue but I will get it.
When I THINK I have it resolved, I’ll post just the updated Windows ‘.03a’ so we can test it.
@hottif and all Windows users.
I did a complete redesign and rewrite of the Windows registry interface.
-
Registry lookup of the paths works as it should

It now respectsLocalAppDataPathkey for Plex. -
This exposed a build problem with one library.
I’ll hopefully complete that tonight, (FTS tables will be fully operational) -
I will post only a DBRepair-0.1999.03a-windows.zip as soon as I’m ready
so Windows users can confirm. -
When Windows confirmed, I’ll look at why StephenH’s DB’s are misbehaving.
(I think there’s corruption / edge case in the blobs DB which I’m not handling correctly )
I have a feature request in case you’re interested ![]()
Entries from old users you once shared server with never gets removed from the DB. They are still selectable in the Plex history etc. It takes up space in the DB, and it can be annoying to see them if they are unwanted.
Now I understand it is probably by design by Plex that they remain but I’m thinking that it would be a perfect addition to your script to remove such entries? It fits with the cleaning/optimization usage of your script. Perhaps the user would have to type specifically any user out that they wish to remove. So it would be safe
what do you think?
If you’re speaking about this information.
This would take some doing to implement if even possible.
To present you with a list, I would have to resolve those IDs from Plex’s database (which the tool doesn’t have access to … part of their ‘secret sauce’)
To remove anything, it would have to replicate PMS core sharing functionality which isn’t what the tool is for.
This is all “Account level” data and stored at Plex.tv.
You should be able to go into your Account → Manage Library Access
and remove the unwanted there.
No, I meant that when you have removed a user, using the method you described, entries for these removed users will still be retained in the database. As far as I know, these are retained forever. It contains these removed users play counts and such.
That’s what I’m talking about. Pruning those removed users data from the database.
Can you do this for me?
- Using “Plex SQLite”, open the ‘com.plexapp.plugins.library.db’
- Type:
select count(*) from view_settings; - Type:
select count(*) from meta_item_settings; - control-D to exit
What number does that report ?


