Almost daily unreachable PMS (Chuck save me)

Alright, I’ll disable all sync and monitor the logs for any mentions of sync activity in hopes that I cleared it out alright. If not, I’m beginning to become concerned that a db rebuild is going to end up having to happen which would be horrid.

Before spinning yourself down that horrible rabbit hole, let’s observe.
I will also speak with Engineering.

Only after we’ve boxed ourselves into a corner will we figure a way out. (It’s more fun that way!!! :rofl:)

Chuck,

A bud mentioned sync data is in the cloud, not just local. Is this true?

No. It’s in your local host’s database.

Privacy concerns aside; the amount of information which would need to be stored for every sync task in the world would be extremely costly with no benefit.

The post you linked shows accessing the server via the hosted (app.plex.tv) app only. That transaction is relayed to the server. If there server were not online, it would fail.

Correct, but if data is being stored on the cloud (which I can confirm there was plenty of sync data being placed there) then itll just sync back down to the running instance of the server. I’ve cleared it out per those instructions. I"m not referring to actual media being synced but rather the list of sync items and such that have been triggered.

Plex.tv stores no media data.
“Plex Cloud” is long ago dead.
“Cloud Sync” is where you link your cloud storage provider to your account.
“Cloud Sync” is a “virtual” server which serves that content through app.plex.tv when you select it as the server to use.

How it works:

  1. You link your Google Drive (as example)
  2. You sync to the to the cloud
  3. In that process, the names are obfuscated and are 1:1 tied to your database.
  4. When you want to play: you select the cloud (virtual server)
  5. Each item is obtained in real time from your server (part of the ‘always connected’ connection requirement.

Ok well all I’m saying is I removed the items from the “conversions” page of my server settings and removed all logs and restarted plex. Within the logs I already see mentions of the old sync data again.

Ok, then I need to go investigate that further and see if I can reproduce.

FYI. The reddit page you posted:

Posted byu/jimphreak
140TB + 20TB
3 years ago

Yeah, but here are my logs for your reference. THis is a FRESH start of plex after clearing logs:

Feb 27, 2020 22:12:21.988 [0x7f5b177fe700] DEBUG - HTTP requesting GET https://plex.tv/servers/REDACTED/sync_lists?auth_token=xxxxxxxxxxxxxxxxxxxx
Feb 27, 2020 22:12:23.313 [0x7f5b177fe700] DEBUG - HTTP 200 response from GET https://plex.tv/servers/REDACTED/sync_lists?auth_token=xxxxxxxxxxxxxxxxxxxx
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] DEBUG - Sync: downloaded 13 sync lists, analyzing now...
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] DEBUG - Sync: sync list 28218360: user 1 (REDACTED), device David iPhone, profile iOS, id 2AF7B95C-9C60-4CB8-A756-37C10E394E87, sync item(s):
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] WARN - Sync: sync list 28218360 belonging to user 1 (REDACTED) has died of old age, ignoring
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] DEBUG - Sync: sync list 28547939: user 20511497 (REDACTED@gmail.com), device Galaxy S9+, profile Android, id 99b00e90fc2a7290-com-plexapp-android, sync item(s):
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] WARN - Sync: sync list 28547939 belonging to user 20511497 (REDACTED@gmail.com) has died of old age, ignoring
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] DEBUG - Sync: sync list 30184615: user 21447948 (REDACTED@gmail.com), device Galaxy S9+, profile Android, id a652d8781d55ca60-com-plexapp-android, sync item(s):
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] WARN - Sync: sync list 30184615 belonging to user 21447948 (REDACTED@gmail.com) has died of old age, ignoring
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] DEBUG - Sync: sync list 32773483: user 22870729 (REDACTED@gmail.com), device I am FBI, profile iOS, id 0367D607-6E8C-4A83-A44B-949D174CA53B, sync item(s):
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] WARN - Sync: sync list 32773483 belonging to user 22870729 (REDACTED@gmail.com) has died of old age, ignoring
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] DEBUG - Sync: sync list 33988002: user 17790253 (REDACTED@gmail.com), device Matthew’s iPad Pro, profile iOS, id 54B213EE-DBC1-470D-852E-6FF6701DDEA8, sync item(s):
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] WARN - Sync: sync list 33988002 belonging to user 17790253 (REDACTED@gmail.com) has died of old age, ignoring
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] DEBUG - Sync: sync list 34400168: user 20410602 (REDACTED@gmail.com), device iPhone, profile iOS, id 95C71BB9-7516-4F16-8DDA-E71334617D05, sync item(s):
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] WARN - Sync: sync list 34400168 belonging to user 20410602 (REDACTED@gmail.com) has died of old age, ignoring
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] DEBUG - Sync: sync list 36158353: user 21447948 (REDACTED@gmail.com), device GTVPC, profile Windows 10 Desktop, id 173148a8-9fdb-4a9b-ba31-73b69fd96dbf, sync item(s):
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] WARN - Sync: sync list 36158353 belonging to user 21447948 (REDACTED@gmail.com) has died of old age, ignoring
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] DEBUG - Sync: sync list 36519158: user 14384292 (REDACTED), device Danas Phone, profile iOS, id C1797951-6D29-4758-9AD0-C7400F5D208E, sync item(s):
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] DEBUG - Sync: sync list 36935183: user 14384292 (REDACTED), device iPhone, profile iOS, id 0A460B48-4742-48AF-92DA-E5A97C78733E, sync item(s):
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] DEBUG - Sync: sync list 36959911: user 20410602 (REDACTED@gmail.com), device iPhone, profile iOS, id 53933FCB-155A-4D74-BE4C-CF0D16FB6B44, sync item(s):
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] WARN - Sync: sync list 36959911 belonging to user 20410602 (REDACTED@gmail.com) has died of old age, ignoring
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] DEBUG - Sync: sync list 37638625: user 14384292 (REDACTED), device Richard’s iPad, profile iOS, id 960780BB-53D5-4856-8F1D-9EED63958C5D, sync item(s):
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] DEBUG - Sync: sync list 38472993: user 20410602 (REDACTED@gmail.com), device Nathaniel’s iPhone, profile iOS, id F00C2BE8-633F-44BA-9C05-49DFBE88BC6E, sync item(s):
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] WARN - Sync: sync list 38472993 belonging to user 20410602 (REDACTED@gmail.com) has died of old age, ignoring
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] DEBUG - Sync: sync list 39440642: user 16861205 (REDACTED@REDACTED.com), device Galaxy Tab A (2016), profile Android, id 9d668e424950a7de-com-plexapp-android, sync item(s):
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] DEBUG - Sync: synchronizing 4 sync lists to generators
Feb 27, 2020 22:12:23.317 [0x7f5b177fe700] DEBUG - Sync: synchronized 4 sync list(s) to 0 generators
Feb 27, 2020 22:12:23.317 [0x7f5b177fe700] INFO - Sync: downloaded 4 sync list(s) with 0 sync items(s): 0 new, 0 updated, 0 deleted
Feb 27, 2020 22:12:23.317 [0x7f5afeffd700] DEBUG - BPQ: garbageCollect - sync - forced - 10
Feb 27, 2020 22:12:23.317 [0x7f5afeffd700] DEBUG - Sync: starting Sync garbage collection: 10, forced
Feb 27, 2020 22:12:23.317 [0x7f5afeffd700] DEBUG - Sync: garbage collecting filesystem
Feb 27, 2020 22:12:23.317 [0x7f5afeffd700] DEBUG - Sync: garbage collected filesystem
Feb 27, 2020 22:12:23.317 [0x7f5afeffd700] DEBUG - Sync: scanning for items to reprocess in sync list 36519158
Feb 27, 2020 22:12:23.317 [0x7f5afeffd700] DEBUG - Sync: scanned for items to reprocess in sync list 36519158
Feb 27, 2020 22:12:23.318 [0x7f5afeffd700] DEBUG - Sync: scanning for items to reprocess in sync list 36935183
Feb 27, 2020 22:12:23.318 [0x7f5afeffd700] DEBUG - Sync: scanned for items to reprocess in sync list 36935183
Feb 27, 2020 22:12:23.318 [0x7f5afeffd700] DEBUG - Sync: scanning for items to reprocess in sync list 37638625
Feb 27, 2020 22:12:23.318 [0x7f5afeffd700] DEBUG - Sync: scanned for items to reprocess in sync list 37638625
Feb 27, 2020 22:12:23.318 [0x7f5afeffd700] DEBUG - Sync: scanning for items to reprocess in sync list 39440642
Feb 27, 2020 22:12:23.318 [0x7f5afeffd700] DEBUG - Sync: scanned for items to reprocess in sync list 39440642
Feb 27, 2020 22:12:23.318 [0x7f5afeffd700] DEBUG - Sync: finished Sync garbage collection: 10

Literally says “Downloaded” =D

So those are valid active sync’d files.

What I will again verify, to make certain I’m not talking with my hat on backwards,

  1. I sync the file to the device
  2. I then delete the sync item
  3. When the device is next online & active, it will remove the file from the device.

Caveat This presumes they’ve not changed how the iOS app works.

I think we’re discussing two different things. You are discussing the pathway by which a synced media item itself is removed from a user’s device. I’m discussing the presence of db sync entries and how they are cleared, etc. Now that I’ve removed the data from the cloud they will not sync anymore to my db on start however I now need to clear it out of the db once and for all.

However, even WITH my attempt at clearing the sync. Immediately on start of plex I see this:

Plex Media Server.log:Feb 27, 2020 22:11:40.450 [0x7f5afffff700] ERROR - Failed to begin transaction (../Library/MetadataCollection.cpp:174) (tries=1): Cannot begin transaction. database is locked
Plex Media Server.log:Feb 27, 2020 22:11:41.150 [0x7f5afffff700] ERROR - Failed to begin transaction (../Library/MetadataCollection.cpp:174) (tries=2): Cannot begin transaction. database is locked
Plex Media Server.log:Feb 27, 2020 22:11:41.550 [0x7f5afffff700] ERROR - Failed to begin transaction (../Library/MetadataCollection.cpp:174) (tries=3): Cannot begin transaction. database is locked
Plex Media Server.log:Feb 27, 2020 22:11:42.350 [0x7f5afffff700] ERROR - Failed to begin transaction (../Library/MetadataCollection.cpp:174) (tries=4): Cannot begin transaction. database is locked
Plex Media Server.log:Feb 27, 2020 22:11:42.950 [0x7f5afffff700] ERROR - Failed to begin transaction (../Library/MetadataCollection.cpp:174) (tries=5): Cannot begin transaction. database is locked
Plex Media Server.log:Feb 27, 2020 22:11:44.151 [0x7f5afffff700] ERROR - Failed to begin transaction (../Library/MetadataCollection.cpp:174) (tries=6): Cannot begin transaction. database is locked
Plex Media Server.log:Feb 27, 2020 22:11:44.552 [0x7f5afffff700] ERROR - Failed to begin transaction (../Library/MetadataCollection.cpp:174) (tries=7): Cannot begin transaction. database is locked
Plex Media Server.log:Feb 27, 2020 22:11:45.354 [0x7f5afffff700] ERROR - Failed to begin transaction (../Library/MetadataCollection.cpp:174) (tries=8): Cannot begin transaction. database is locked
Plex Media Server.log:Feb 27, 2020 22:11:45.958 [0x7f5afffff700] ERROR - Failed to begin transaction (../Library/MetadataCollection.cpp:174) (tries=9): Cannot begin transaction. database is locked
Plex Media Server.log:Feb 27, 2020 22:11:47.166 [0x7f5afffff700] ERROR - Failed to begin transaction (../Library/MetadataCollection.cpp:174) (tries=10): Cannot begin transaction. database is locked
Plex Media Server.log:Feb 27, 2020 22:11:47.166 [0x7f5afffff700] ERROR - Fixup 29DatabaseFixupsSyncCollections threw an exception: Cannot begin transaction. database is locked
Feb 27, 2020 22:12:23.315 [0x7f5b177fe700] DEBUG - Sync: sync list 36519158: user 

The two terms “Sync” and “Downloaded” are potentially VERY confusing.

This is why. I “Sync”'d the album to the iPad.

This is the current status.

Let’s get on the same path for one facet and the other will fall into line.

I do think I’m referring to “Syncing” but those messages I posted above are of concern to me. How would it be locking like this on start of plex?

They’re of concern to me too. That’s why I said there might be a database race condition as it’s performing two tasks:

  1. Recovering from a crash
  2. Normal startup sequencing; of which Sync list refresh processing is one of the first.

I don’t think it is possible to clear any sync lists from other shared users ?

perhaps it is a shared user trying to do the sync

AFAIK, (could be wrong here)

It’s my media and I control who has it; shared or otherwise.
If I rescind the sync, it gets removed.

I will say this, looking at logs when it starts up it fetches sync lists from the cloud and now that I have removed all SyncItems from those lists for each user it comes back with no entries for each list that It retrieved.

BUT, I still did see that database locked entry at the start. Hasn’t appeared again yet

I just tested syncing to the iPad and deleting while it was offline.
While offline, I looked at what was pending. Plex.tv was holding the pending “Delete” task.

When the iOS app started and connected, it removed the sync’d content.

This is how I understand it should work. Whether pending sync/download task or pending deletion task.

I then went back offline and queued a sync.
When the app came back up, sync started and the music came down.

Are we talking about two different things here? (queue, download, or delete)

Since nothing crashed, PMS did not have any complaints either during its restart