Dashboard Graphs not Displaying for June 2021 for Top Users and Play History (Version 1.23.3.4707)

Server Version#: 1.23.3.4707

As title says. My Top Users and Play History graphs don’t display unless I select 90 days. 7 days and 30 days show nothing. If I select All Time the graphs end with May 2021.

Thanks.

I should also mention that the [View Full History] link DOES display all recent viewings. Hope that helps track down the issue.

Thanks.

No such issue here – can you double-check/verify the server’s local time is properly set? (though if your server time was that far off, there should also be other issues)

1 Like

Thanks for the quick response, tom80H.

Yep the server’s date/time is accurate.

I assume your server is still “claimed” and recognizes that it has a Plex Pass?

Yeppers… still showing Lifetime Plex pass.

Sorry this is being so difficult. It will probably be something simple, and if I’m the only one experiencing, something I’ve done. However, I have done no configuration changes to it at all for as far as I can remember. I have kept up on all updates also.

Weird. Not a huge deal, just not as it should be.

Interested in running a SQL query in your database?

Sure, but I’m and end-user… will need a primer… :slight_smile:

It’s worth doing the Check for Corruption and Automatically Repair the Database steps here.

https://support.plex.tv/articles/repair-a-corrupted-database/

Then you can try these:

There was previously an issue where databases got huge with NULL records. I think that’s been resolved. This would reveal anything similar:

"C:\Program Files (x86)\Plex\Plex Media Server\Plex SQLite.exe" com.plexapp.plugins.library.db "SELECT COUNT(),account_id FROM statistics_media GROUP BY account_id;"

And this to see if records are present from the last week, and if they’ve been rolling up.

"C:\Program Files (x86)\Plex\Plex Media Server\Plex SQLite.exe" com.plexapp.plugins.library.db "SELECT COUNT(),account_id,timespan FROM statistics_media WHERE at > DATE('now','-7 days') GROUP BY account_id, timespan LIMIT 30;"

Sorry for the delay in responding. I wasn’t sure how long the integrity check would last and went to bed.

I first shut down the plex server. BTW I have restarted the physical plex server in the past to see if that would correct the issue but no bueno.

  1. Backed up C:\Users\NAME\AppData\Local\Plex Media Server\Plug-in Support\Databases*.* (probably overkill)

  2. Ran “C:\Program Files (x86)\Plex\Plex Media Server\Plex SQLite.exe” com.plexapp.plugins.library.db “PRAGMA integrity_check”… result: OK

  3. Ran “C:\Program Files (x86)\Plex\Plex Media Server\Plex SQLite.exe” com.plexapp.plugins.library.db “.output recover.out” “.recover”… result: recover.out file created

  4. Ran “C:\Program Files (x86)\Plex\Plex Media Server\Plex SQLite.exe” com.plexapp.plugins.library.db “SELECT COUNT(),account_id FROM statistics_media GROUP BY account_id;”… output:

498|1
44|4074653
202|4716628
12|9445272
162|14146146
6|14237126
207|14237127
62|14237138
4132|14238431
623|15035515
41|15527460
331|15963492
21|16974879
44|17831898
69|17871601
3|18037075
3|18040489
21|18352077
3|21505799
3|22490937
3|22537837
123|23062983
142|26077355

  1. Ran “C:\Program Files (x86)\Plex\Plex Media Server\Plex SQLite.exe” com.plexapp.plugins.library.db “SELECT COUNT(),account_id,timespan FROM statistics_media WHERE at > DATE(‘now’,’-7 days’) GROUP BY account_id, timespan LIMIT 30;”… output: nothing

Also, if it helps, my file listing in C:\Users\NAME\AppData\Local\Plex Media Server\Plug-in Support\Databases\ (while plex is NOT running):

05/01/2020 01:06 PM 2,736,128 com.plexapp.dlna.db
04/30/2020 04:53 PM 32,768 com.plexapp.dlna.db-shm
05/01/2020 01:06 PM 4,202,432 com.plexapp.dlna.db-wal
07/01/2021 03:43 AM 197,384,192 com.plexapp.plugins.library.blobs.db
06/25/2019 01:09 AM 51,854,336 com.plexapp.plugins.library.blobs.db-2019-06-25-tmp
12/28/2019 02:13 AM 30,875,648 com.plexapp.plugins.library.blobs.db-2019-12-28-tmp
07/01/2021 06:11 AM 15,011,621,888 com.plexapp.plugins.library.db
06/25/2019 01:08 AM 4,699,969,536 com.plexapp.plugins.library.db-2019-06-25-tmp
12/28/2019 02:12 AM 7,748,761,600 com.plexapp.plugins.library.db-2019-12-28-tmp
05/27/2021 08:47 AM 8,503,048,192 com.plexapp.plugins.library.db-2021-05-27-tmp
05/27/2021 08:44 AM 1,024 com.plexapp.plugins.library.db-2021-05-27-tmp-journal
06/26/2021 08:57 AM 7,155,045,376 com.plexapp.plugins.library.db-2021-06-26-tmp
06/26/2021 08:54 AM 1,024 com.plexapp.plugins.library.db-2021-06-26-tmp-journal
07/01/2021 07:33 AM 0 database_dir.txt
07/01/2021 07:27 AM 28,515,354,889 recover.out

Hope this all helps! Thanks! :slight_smile:

A quick update: I restarted the Plex Server and the dashboard is reporting “Optimizing Database”.

2 hours later it is still going. The following two files were created and are slowly growing in size:

com.plexapp.plugins.library.db-shm 105MB
com.plexapp.plugins.library.db-wal 13.6GB

Without closing the tab showing the Optimization running, I opened another with plex and it does NOT show it running, but all libraries are showing unavailable. I don’t want to restart the server if it creates problems.

Backups are good!

This is good, no NULL entries or huge outliers.

This is bad, but explains what you’re seeing. There’s no recent data in here. I suspect this means some database operations have been failing for a while.

15 GB is pretty darn huge, and also makes me think there’s something wrong in here.

The presence of -tmp and -journal files makes me think that there have been database operations failing to complete for a while. I believe that those -tmp files, and their sizes, indicate that backups have been failing. That’s … unfortunate.

If you possibly can, it’s worth seeing if the Optimize ... ever completes. It’s normal for Plex Libraries to be unavailable during that process.

I’m not feeling great about this - if the Optimize ... is super-slow even after a .recover, that’s not a good sign.

I’d let the Optimize ... go as long as you can stand, to see if it completes.

After that, I think your next (only?) step is to try the Manually Repair the Database step from the support doc.

Do you have a complicated Library setup? Manually-edited data, complicated collections & tags, etc? Do you care about your watch history?

I went to lunch and came back to see that the optimize has completed. The libraries are showing now and accessible through my Plex client for viewing.

“Do you have a complicated Library setup?” I would not say so.

Disney Movies: 158 titles
Audiobooks: 5 authors 60 titles
Home Movies: 7 titles
Movies: 795 titles (most 720p)
Music: 43672 tracks (all 320kb or less)
TV Shows: 3577 episodes (most 480p)
Child Movies: 13 titles
Child Music: 134 tracks
Child TV Shows: 716 episodes
Archived Movies (Library of 1 byte files that act as placeholders for archived (offline) files): 2941 titles
Archived TV Shows (Library of 1 byte files that act as placeholders for archived (offline) files): 25715 episodes

The archived libraries have been in use since October 2019 with no problems so I don’t think they are the cause (see topic “I would like offline (archived) files in a library for reference” in General Discussions for more info).

“Manually-edited data, complicated collections & tags, etc?” I have maybe 50 titles tops that have manually entered metadata and pics for odd things that don’t scrap with the current agents. Those have been in place for several years also.

“Do you care about your watch history?” Not that important. The info is useful but this is more a hobby for use with just a couple friends and family.

If the databases are abnormally large, I would follow any recommendations for shrinking them as disk space is a premium (hence the archiving of older titles). But the less painful the better! :slight_smile:

Excellent!

I’m curious - has the database file size changed?

And has the dashboard started working?

Or are there any new rows being added to the table?

That’s interesting.

Almost 30,000 identical files. Those will all have the same directory_id and hash in the database.

I can’t immediately think of any reason that would cause problems. It’s just interesting.

Doh, I should have known to check this stuff post-optimize… sorry :-/

05/01/2020 01:06 PM 2,736,128 com.plexapp.dlna.db
04/30/2020 04:53 PM 32,768 com.plexapp.dlna.db-shm
05/01/2020 01:06 PM 4,202,432 com.plexapp.dlna.db-wal
07/01/2021 10:25 AM 197,384,192 com.plexapp.plugins.library.blobs.db
06/25/2019 01:09 AM 51,854,336 com.plexapp.plugins.library.blobs.db-2019-06-25-tmp
12/28/2019 02:13 AM 30,875,648 com.plexapp.plugins.library.blobs.db-2019-12-28-tmp
07/01/2021 10:25 AM 1,572,864 com.plexapp.plugins.library.blobs.db-shm
07/01/2021 10:25 AM 202,011,464 com.plexapp.plugins.library.blobs.db-wal
07/01/2021 02:09 PM 15,014,397,952 com.plexapp.plugins.library.db
06/25/2019 01:08 AM 4,699,969,536 com.plexapp.plugins.library.db-2019-06-25-tmp
12/28/2019 02:12 AM 7,748,761,600 com.plexapp.plugins.library.db-2019-12-28-tmp
05/27/2021 08:47 AM 8,503,048,192 com.plexapp.plugins.library.db-2021-05-27-tmp
05/27/2021 08:44 AM 1,024 com.plexapp.plugins.library.db-2021-05-27-tmp-journal
06/26/2021 08:57 AM 7,155,045,376 com.plexapp.plugins.library.db-2021-06-26-tmp
06/26/2021 08:54 AM 1,024 com.plexapp.plugins.library.db-2021-06-26-tmp-journal
07/01/2021 09:58 AM 117,276,672 com.plexapp.plugins.library.db-shm
07/01/2021 02:09 PM 15,360,716,288 com.plexapp.plugins.library.db-wal

File sizes above… no apparent reduction in sizes that I can tell.

I played a video for a minute via the client, then checked and sure enough, it’s showing my 1 minute TV viewing for today (Top Viewer for last 30 days, baby!) and the Play History graph is also showing the nice pinkish/red bar. So whatever happened (optimizing?) seemed to have kickstarted back into gear. When viewing All Time Play History graph, all of June '21 is missing, but all prior to June '21 is still showing, and today’s July '21 (since optimization completed) graphs are showing.

But as you can see above I still have an 80+Gb Database folder. Any suggestion on reducing that? I know, I know, beggars can’t be choosers and I can live with it, but you know, 80 gigs… that’s room for almost 100 720p movies! :slight_smile:

Thanks so much for all the help so far… next time you are in south Texas, I owe you a beer.

Well, they are identical in size and contents only, the file names are all unique to the titles I am cataloging… if that makes sense.

You can certainly remove the -tmp and -journal files. They’re orphaned at this point.

!!! Don’t remove .db, .db-shm, or .db-wal files !!!

You should have database backups in that folder, but they haven’t been created successfully recently. That’s concerning - but it’s possible they will be created successfully going forward.

They should be created weekly-ish. Check the folder again in a week to make sure they’re occurring.

https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/

I’m still not sure why your database is that big. I’d be interested in any Plex folks speaking up here. The Plex-provided SQLite utility doesn’t include some of the tools I would use to look at database size.

Maybe the Optimize helped! But Plex ordinarily does an Optimize weekly anyway. Maybe the .recover and then the Optimize together helped! I dunno. Yay!

You haven’t disabled any of the Scheduled Tasks, have you?

https://support.plex.tv/articles/201553286-scheduled-tasks/

Quite cleverly, Plex uses a partial hash of the file contents to identify duplicate files. File name doesn’t matter.

I don’t think it’s related, I just think your setup is interesting. I don’t think it saves space in the database - every copy gets a record, they just share a hash and metadata path.