Server Version#: 1.32.8.7639
Player Version#: 4.116.1 (plex web)
Just looking for clarification. To get to the point, i have a damaged database. frequent crashing while doing anything in plex.
I know sqlite for the 32bit plex version is available, but im running 64bit. Ive seen a 3rd party database repair for plex 64 bit, but it does not directly support windows.
what can i do, being on windows 64 bit to clean up and repair my database?
Ive tried 32bit sqlite repair, but that would not allow plex to load anything.
Ive tried from plex 64bit, cleaning the database in plex web. but that did not resole the behaviors i am seeing.
Please advise what i might try. thank you community.
Make sure not to raise the database cache size to more than a few dozen MB.
Some users mistake this as a cache which holds the whole DB file, but that is absolutely not the case.
Set it back to the default 20 or 40 MB and see if this makes the crashes cease.
Database cache size is set to 40mb; though i never modified that setting at any point in my use of plex.
If sqlite is included with plex, where is that located? specifically the 64 bit version? no such file is present.
It is however, as expected, present in the 32 bit version.
If ChuckPa’s database tool works in windows; there are no instructions on its usage written on the github page. is there a place where this information is available that i might get pointed to?
It’s in the same relative spot that it was for the 32-bit version, %PROGRAMFILES%\Plex\Plex Media Server\Plex SQLite.exe assuming a default installation.
There are no arguments. From the script itself:
REM PlexDBRepair.bat - Database maintenance / rebuild tool for Windows.
REM
REM This tool currently works as a "full shot" service.
REM - everything is done without need to interact.
So you should be able to just double-click the script (or run it from an existing command prompt if you want to keep the log messages around after the script finishes).
I expected that to be the case for the location of the sqlite program in the 64 bit version; the same as the 32 bit version. what i ran into is that in my directory for plex installation, everything for the 32 bit version and 64 bit version are the same, except i dont have a few of the executable programs in my 64 bit directory. i have plex update service, and plex application, and the rest are just not there. I assume newer install of 64 bit would have it. SO i did just that. removed my install and ran the latest stable 64 bit version. Now its there.
as for the database repair script, not even explaining that for windows, you have to rename the file .bat and run it without arguments would have saved questions, and i apricate your help explaining that as its not on the github page.
So i tired to run the script by double clicking; and tried bash to run the script, as well as a .bat version. all failed to run. bash needs linux or wsl.exe and the other 2 did not seem to do anything to the database file. I did run the script each attempt in the same location as the database file backup i made; in an isolated folder.
I would say, aside from the Plex DBRepair.bat which isnt already that way with the download from the github page, that how its run in windows and those requirements should at least be listed for running the script in windows.
Not sure if any of that makes sense. but its what i was running into.
That all said, might not make sense; but i was not able to get the DBRepair.sh to do anything. .sh version doesnt do anything. .bat version spams errors not recognized as internal or external command, operable program or batch file.
Tried double clicking .sh script. failed. Tried running through powershell as ./DBRepair.sh and did the same thing.
thats the DBRepair.sh renamed as DBRepair.bat? i tried that and it resulted in a whole lot of line errors.
Ah, not even close. DO NOT use the Releases page for the DBRepair.sh for windows.
In the github main page, i downloaded the DBRepair-windows.zip from above the readme.md where a list of files is shown.
In my case specifically because i have plex database in a different directory from the default location, i changed the .bat file for the location of the database and the sqlite application with the ones that match for my install with absolute directories. Then ran the .bat file from a regular command prompt with plex media server offline. The script then functioned with outputs i would expect to see, such as output for exporting the database.
thank you for your help, FordGuy61, Drahn and OttoKerner. I was able to run the script with each bit of extra input you all contributed.
An independent follow up to the database repair, following the use of the script which did its best; and output was main database was OK, and Blobs Database was OK. I did not see any notifications of Indexing or recovery though.
It showed 4 files moved and activated as it completed, and generated a temporary working directory and log file with the database’s. Nothing looked to be an issues with any of that.
I tested media affected before by the database having issues, and the same behavior continues to occur.
To note however, plex seems to respond / load menus at normal speed; where as before fixing the database that was slow or would error out. I’ll need to investigate the root crashes further.
thank you again for all the help with the database repair.
Otto, this is the first ive seen this information, ive been trying to deal with DB SQLITE issues and came across your comment. PLEX support article for DB Cache size isnt even mentioned in it, if this is correct information then it is VERY important that this article is updated to reflect the correct information about what the DB cache size is and what changing it does.