@mpalermo73
There is a bug in some 1.41.7 beta releases that caused the massive db growth.
v1.41.7.9799 and v1.41.7.9823 stop the growth, but do not shrink the db back to normal.
Plex will have a fix to shrink the growth in an upcoming release (availability tbd).
To shrink things now, you can use the DBRepair for Plex Media Server tool.
To use the tool, SSH into the NAS, download and run the tool.
STOP Plex Media Server, then use the AUTO option.
The process will take a long time, as in hours. Deleting the statistics is single threaded, using only one CPU core, and Synology NAS have low power CPUs.
This is for an install via Synology Package Center (“bare metal”). If you are using Docker, see the README on GitHub for additional information.
# change to the PlexMediaServer directory. Volume 1 is default, adjust if using different location.
cd /volume1/PlexMediaServer
# download DBRepair.sh, -O means overwrite an existing file if one is present.
sudo wget -O DBRepair.sh https://github.com/ChuckPa/DBRepair/releases/latest/download/DBRepair.sh
# make it executable
sudo chmod a+x DBRepair.sh
# run it (interactive)
sudo ./DBRepair.sh
# can also run non-interactively
sudo ./DBRepair stop auto start exit
FYI, there is another option. It is a little more work, but potentially much faster if you have a system (PC, Mac, etc.) with a faster CPU and SSD.
- Install PMS on the PC and claim the server. No need to create libraries, etc.
- On the new server, Settings → Library: disable
Empty trash automatically after every scan (enabled by default).
- Stop PMS on both systems.
- Copy the
com.plexapp.plugins.library.db and com.plexapp.plugins.library.blobs.db files from the NAS to the PC.
- Using Plex SQLite, manually issue the SQLite commands to delete the info from the database.
- When finished, copy the db files back to the NAS and start PMS.
See Library.db size more than doubled in latest version - #207 by FordGuy61 for additional information on how to manually run the commands. Three different methods are listed. All work equally well. The DBRepair tool uses #3.