Been running Plex on Windows Server 2019 for four months without issue. All of my media is mapped using direct UNC paths ie \10.0.0.10\Media. I recently moved a bunch of media from one directory to another giving the Plex Scanner a good workout. I get consistent timeouts with both the scanner and with Plex media server itself, disconnecting all clients and crashing the web interface.
After looking through the logs I’m not sure anything is actually crashing. It looks more like things are just sitting around waiting for a busy DB. This VM is running on a vSAN with a PCIe Samsung 970 Pro for it’s cache.
Status Cake showed timeout at 9:27:46am
Interesting Logs:
Jun 25, 2019 09:26:47.479 [6376] WARN - Waited one whole second for a busy database.
Jun 25, 2019 09:26:50.916 [6376] WARN - Waited one whole second for a busy database.
Jun 25, 2019 09:26:54.700 [6228] ERROR - Failed to begin transaction (…\Statistics\Device.cpp:46) (tries=1): Cannot begin transaction. database is locked
Jun 25, 2019 09:26:57.242 [6228] WARN - Waited one whole second for a busy database.
Jun 25, 2019 09:26:58.809 [6228] ERROR - Failed to begin transaction (…\Statistics\Device.cpp:46) (tries=2): Cannot begin transaction. database is locked
Jun 25, 2019 09:27:01.451 [6228] WARN - Waited one whole second for a busy database.
Jun 25, 2019 09:27:03.204 [7108] WARN - Waited one whole second for a busy database.
Jun 25, 2019 09:27:03.235 [1236] WARN - Waited one whole second for a busy database.
Jun 25, 2019 09:27:04.812 [1236] ERROR - Failed to begin transaction (…\Statistics\Device.cpp:46) (tries=1): Cannot begin transaction. database is locked
Jun 25, 2019 09:27:06.574 [7108] WARN - Waited one whole second for a busy database.
Jun 25, 2019 09:27:10.168 [7516] ERROR - Failed to begin transaction (…\Statistics\Device.cpp:46) (tries=1): Cannot begin transaction. database is locked
Jun 25, 2019 09:27:12.176 [7516] WARN - Waited one whole second for a busy database.
Jun 25, 2019 09:27:13.742 [7516] ERROR - Failed to begin transaction (…\Statistics\Device.cpp:46) (tries=2): Cannot begin transaction. database is locked
Jun 25, 2019 09:27:16.320 [7516] WARN - Waited one whole second for a busy database.
It continues like this until you start seeing ERRORs relating to parsing urls.
I will also say that I didn’t have the option “run scanner tasks at lower priority” enabled until after this happened. I am hoping that will mitigate the issue.
not 100% clear how this is being used in reference to the move… for example was the IP removed and a new one set for a different path?
my experience has lead me to move things in smaller chunks and let Plex sort it out (meaning I don’t manually re-scan the folder).
I’ve also have had the need to move ~40TB in one swing. The best solution was to leave the existing path in place and add the new one. This showed the file 2wice one unavailable and the new one. After a day or to I then remove the first path and Plex cleans everything up and all my settings remain as they originally were but with the new path.
I’ve notice that Plex tries to figure out if its a new file (an additional version) if so add it and then analyzes it as needed. Manually scanning forces this to take place. With a lot of files this becomes a massive addon of information.
But if left alone it tries to figure out if it’s the same file moved to a new location or just renamed. If it’s the same file it updates the path. It can handle 1 of those 2 things, one at a time, with no problem. If both are done then it just treats it like an additional file.
If needed, I move first, let it update on its own. Afterwards rename and let it update on its own. It’s not an exact science but more usually than not it works with no problems. The few times it fails I just manually clean it up.
We keep using the term ‘move’ but let’s be clear for the many who may come and see this post that we are really talking about ‘copy’.
Never move content you want to keep in Plex especially if it’s content you have made edits to(title changes, posters, etc…).
BUT, if you insist on ‘moving’ then be sure you uncheck(disable) the following options(setting --> library) Scan my library automatically Run a partial scan when changes are detected Scan my library periodically Empty trash automatically after every scan <- especially this!!!
But on point. I’m not to sure what the issue is. I see many of these in your logs.
Jun 25, 2019 09:28:08.379 [4224] ERROR - Exception inside transaction (inside=1) (..\Library\MetadataItem.cpp:3424): Unable to allocate a changestamp from the server
And a crap ton of sync errors.
Jun 25, 2019 05:41:57.565 [7588] ERROR - LPE: unknown item 63615.
Jun 25, 2019 05:41:57.565 [7588] ERROR - Sync: failed to generate query for path library://c56f9b65-c4b3-4f90-9224-5c58e6426b59/item/%2Flibrary%2Fmetadata%2F63615 in sync item 34597328
Jun 25, 2019 05:41:57.565 [7588] ERROR - Sync: empty sync set, unable to update status for sync list 15801688, sync item 34597328
Jun 25, 2019 05:41:57.565 [7588] ERROR - LPE: unknown item 64085.
Jun 25, 2019 05:41:57.565 [7588] ERROR - Sync: failed to generate query for path library://c56f9b65-c4b3-4f90-9224-5c58e6426b59/item/%2Flibrary%2Fmetadata%2F64085 in sync item 35518068
Jun 25, 2019 05:41:57.565 [7588] ERROR - Sync: skipping items for sync list 31176886, sync item 35518068: unable to generate sync set query
Jun 25, 2019 05:41:57.565 [7588] ERROR - LPE: unknown item 681.
Jun 25, 2019 05:41:57.565 [7588] ERROR - Sync: failed to generate query for path library://c56f9b65-c4b3-4f90-9224-5c58e6426b59/item/%2Flibrary%2Fmetadata%2F681 in sync item 36427110
Jun 25, 2019 05:41:57.565 [7588] ERROR - Sync: skipping items for sync list 31176886, sync item 36427110: unable to generate sync set query
On another note. Not the root cause of your issue but could put more time on the overall scan. Some of the filenames are wrong.
You are using [] for the year. You should be using () because anything in the [ ] will be ignore by plex.
To clear a few items up. When I say move I really mean, copy to a new directory. I typically copy everything over, let Plex match the media hash then after a few days remove the original copy after I’ve confirmed it’s done. Second, I know the preferred method is regular brackets and not square brackets but Plex has been working for years just fine using square brackets. I’m not having an issue with new media not being picked up. The issue I was having is that it was causing timeouts during the media scans. I mentioned the big move of data because it’s unusual that I have to scan in 15TB of media.
This is probably the cause of the problem. I have come across another case of database lockouts when the Plex Media Server app data and database is on a SAN (see Plex Media Server crashing nightly - #4 by Dorbson)
This is a hybrid vsan so point taken that it might not be performant enough to handle 100TB of media. I’ll buy a few more SSDs and make it an all flash setup and report back.
The leading word on the topic said, "Move"and he stated “I recently moved”, so I would have never even guessed he meant “Copy”. WHen I used the term “Move”, I was actually meaning “Move”
I always keep this disabled & the reset always enabled, especially so Plex can handle “moves” without deleting data then going back out to download after detecting it.