Thanks for all the advice. Great working with you all.
So here’s what I did:
#> systemctl stop plexmediaserver
#> cp com.plexapp.plugins.library.db com.plexapp.plugins.library.db.backup
#> sqlite3 com.plexapp.plugins.library.db
SQLite version 3.7.17 2013-05-20 00:56:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> DROP index 'INDEX_TITLE_SORT_NATURALSORT';
sqlite> DELETE from schema_migrations where version='20180501000000';
sqlite> DELETE FROM STATISTICS_MEDIA WHERE account_id IS NULL;
sqlite> PRAGMA integrity_check;
ok
sqlite> .quit
#> sqlite3 com.plexapp.plugins.library.db .dump > dump.sql
#> rm com.plexapp.plugins.library.db
#> sqlite3 com.plexapp.plugins.library.db < dump.sql
#> ls -l com.plexapp.plugins.library.db
-rw-r--r--. 1 root root 114881536 Aug 22 17:59 com.plexapp.plugins.library.db
#> chown plex:plex com.plexapp.plugins.library.db
#> systemctl start plexmediaserver
<Waited a few minutes>
#> systemctl status plexmediaserver
<Also browsed around media collection to ensure stuff looked good>
#> rm dump.sql
<Ran an optimize from Manage --> Troubleshooting>
Final DB Size: 116 MB
I will keep watching for feedback from the developer Otto. Quite curious to see what is found. I’ll also keep watching the DB size and see if it starts ballooning again.
So just to be clear, if it DOESN’T start ballooning again - What I have changed is
- deleted all those rows from the statistics_media table
- rebuild the DB
- upgrade to the latest server version
- turn off some of the scheduled tasks (unchecked ‘perform extensive media analysis…’ and ‘perform refresh of program guide data’).
I haven’t changed my clients or turned off DLNA. I’ll see where this goes first.