I doubt that I am. I do everything through the webpage at port 32400. I have some 3rd party plugins, āSub-Zeroā and āWebtoolsā but theyāve been installed for months, I havenāt tweaked them to my knowledge. I havenāt used the Webtools since I rebuilt my server and restored the DB a few months ago.
The DLNA server is on, but I havenāt used it either except a couple tests. Plan to use it more when/if I add a music library. Have a couple Rokus, iPad, and Sony Smart TV that access Plex regularly through the app. Donāt do a lot of viewing of the photo library, mostly movies and TV watching.
Is there a way to check and make sure? Do you need logs or want me to look at log files? I know without specifics, this would be hard to track down. So I can do whatās needed there, just let me know.
Sorry, I should have put a little more in here from the report. I pasted in the first few lines from the report of the ābig stuffā.
*** Page counts for all tables and indices separately *************************
STATISTICS_MEDIA.................................. 593307 35.7%
INDEX_STATISTICS_MEDIA_ON_ACCOUNT_ID_AND_TIMESPAN_AND_AT 500120 30.1%
INDEX_STATISTICS_MEDIA_ON_AT...................... 456306 27.4%
METADATA_ITEMS.................................... 28503 1.7%
MEDIA_PARTS....................................... 15461 0.93%
TAGGINGS.......................................... 9876 0.59%
MEDIA_ITEMS....................................... 7365 0.44%
INDEX_MEDIA_PARTS_ON_FILE......................... 5030 0.30%
*** All tables ****************************************************************
Percentage of total database...................... 39.9%
Number of entries................................. 16619201
Bytes of storage consumed......................... 679804928
Bytes of payload.................................. 529822166 77.9%
Bytes of metadata................................. 125376747 18.4%
*** All indices ***************************************************************
Percentage of total database...................... 60.1%
Number of entries................................. 34696084
Bytes of storage consumed......................... 1022745600
Bytes of payload.................................. 886420022 86.7%
Bytes of metadata................................. 116073731 11.3%
*** Table STATISTICS_MEDIA and all its indices ********************************
Percentage of total database...................... 93.2%
Number of entries................................. 48121050
Bytes of storage consumed......................... 1586926592
Bytes of payload.................................. 1325863632 83.5%
Bytes of metadata................................. 228469921 14.4%
*** Table STATISTICS_MEDIA w/o any indices ************************************
Percentage of total database...................... 35.7%
Number of entries................................. 16040350
Bytes of storage consumed......................... 607546368
Bytes of payload.................................. 473547885 77.9%
Bytes of metadata................................. 120750717 19.9%
B-tree depth...................................... 4
*** Indices of table STATISTICS_MEDIA *****************************************
Percentage of total database...................... 57.5%
Number of entries................................. 32080700
Bytes of storage consumed......................... 979380224
Bytes of payload.................................. 852315747 87.0%
Bytes of metadata................................. 107719204 11.0%
Average payload per entry......................... 26.57
*** Index INDEX_STATISTICS_MEDIA_ON_ACCOUNT_ID_AND_TIMESPAN_AND_AT of table STATISTICS_MEDIA
Percentage of total database...................... 30.1%
Number of entries................................. 16040350
Bytes of storage consumed......................... 512122880
Bytes of payload.................................. 443669168 86.6%
Bytes of metadata................................. 54122486 10.6%
*** Index INDEX_STATISTICS_MEDIA_ON_AT of table STATISTICS_MEDIA **************
Percentage of total database...................... 27.4%
Number of entries................................. 16040350
Bytes of storage consumed......................... 467257344
Bytes of payload.................................. 408646579 87.5%
Bytes of metadata................................. 53596718 11.5%
Okay. Thanks. The statistics_media table content is very interesting. The database is over 2 years old that I have, and thereās just an explosion of entries as of late. There is a date with the entry, making it pretty easy to see when the bulk of the entries were added to the table. Of course not knowing how the table works Iām not certain of anything. It is odd that first date is exactly Jan 1stā¦
First entry :
row id account_id device_id timespan at metadata_type count duration
1 1 1 8 0 2018-01-01 00:00:00 12 5 1626
<1 year>
797 3576 1 8 0 2019-01-01 00:00:00 4 198 605589
<1 year>
1739 7204 1 28 0 2020-01-01 00:00:00 1 1 2452
<Here's where it gets weird. There are about 7.4 million more rows with this date>
7435288 16053485 8 0 2020-01-01 00:00:00 1 0 0
7435289 7223 1 34 2 2020-01-06 00:00:00 4 21 53293
Then several million more rows, mostly of dates 2020-07-01 and 2020-08-01, but several million of dates in the last 10 days of 2020-08-10 thru 08-21.
I think it is important to note:
I JUST upgraded to the server version in my first post. So technically most of this happened while this version was installed.:
plexmediaserver-1.19.4.2935-79e214ead.x86_64
I have been running 1.19.4.2935 since July 15th, 2020 until just a few hours ago.
If you are willing to send me a copy of your database (please ZIP it), I can relay this to a developer, who has agreed to take a look at it.
Please download the database using the web app. If you want to copy it directly out of the plex data folder, make sure that the Plex server daemon is stopped before you do it. Otherwise the database copy will be damaged.
Thanks! Iāll leave the file up as long as you need it. Wish the developer good luck.
Iāve got disk space so no rush, and the server is still snappy enough even with the big DB. So Iāll go on standby. If I notice that upgrading to the latest version has slowed the DB growth, Iāll note that here.
You might wanna try the database repair procedure. It will throw away all index tables and Plex server will recreate them on first startup afterwards. Maybe this will make some difference.
I experienced this issue several months ago. I noticed it because database optimization on my system went from completing in 4 - 5 seconds to several minutes. This prompted me to check my database size and it had ballooned by an order of magnitude. I used sqldiff to compare the current DB with a normal-sized backup and found that the table statistics_media was being written to constantly, even with no server usage.
Examining the database further, I found that these ārogueā additions were being made with a device_id not present in other entries in the database (or at least not many entries) and the account_id was null. As I had a recent, working database backup, I decided to whack all of the entries with a null account_id; after doing so, my database size reverted to its normal size.
I also signed out all of my known clients and cleaned up my authorized devices in settings. The issue has not recurred since doing so. Iād been playing around various clients (Plex desktop app, Plex Media Player, Plex Amp) around that time, so it may have been something I did with one of those which caused the rogue writes.
Iām not necessarily suggesting you modify your database, particularly if you donāt have recent, working backup. However, it did help in my case.
Iād really like to be able to disable statistics collection in general. Iād rather not write to the database every [minute] just because any client is open, anywhere.
Or similarly, it would be nice to move the statistics_* tables out of the primary db. They grow constantly over time and receive disproportionately more writes than any other table.
If you donāt care about the statistics, I donāt think thereās any danger in delete from statistics_media or delete from statistic_bandwidth.
Edit: there are LOTS of reasons you might care about statistics. See Ottoās comment below.
(Obviously make backups, etc. And do it AFTER you share with Plex so they can identify whatās going on.)
(If Iām wrong Iām sure somebody will say NO THATāS WRONG, DONāT DELETE THAT DATA.)