Docker container keeps loosing connection/access - DB constantly busy

At the VM Guest level:

andrew@apollo:~$ sudo hdparm -Tt /dev/sdb

/dev/sdb:
 Timing cached reads:   19262 MB in  2.00 seconds = 9651.45 MB/sec
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 Timing buffered disk reads: 2706 MB in  3.00 seconds = 901.96 MB/sec
andrew@apollo:~$ sudo hdparm -Tt /dev/sdb

/dev/sdb:
 Timing cached reads:   20236 MB in  2.00 seconds = 10141.30 MB/sec
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 Timing buffered disk reads: 2738 MB in  3.00 seconds = 912.12 MB/sec
andrew@apollo:~$ sudo hdparm -Tt /dev/sdc1

/dev/sdc1:
 Timing cached reads:   19366 MB in  2.00 seconds = 9703.55 MB/sec
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 Timing buffered disk reads: 9146 MB in  3.00 seconds = 3047.93 MB/sec
andrew@apollo:~$ sudo hdparm -Tt /dev/sda1

/dev/sda1:
read(2097152) returned 1048576 bytes
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 Timing buffered disk reads: read() hit EOF - device too small

sdb and sdc are on the same physical nvme ssd. It could be a bad section of the ssd, but I am not sure if that is the real answer there.

The same VM (Ubuntu 19) where the previous raw read was performed.

chuck@ubuntu:~$ sudo !!
sudo dd if=/dev/sda of=/dev/null bs=1M
65536+0 records in
65536+0 records out
68719476736 bytes (69 GB, 64 GiB) copied, 59.4099 s, 1.2 GB/s
chuck@ubuntu:~$ sudo hdparm -Tt /dev/sda1

/dev/sda1:
 Timing cached reads:   22236 MB in  1.99 seconds = 11171.12 MB/sec
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 Timing buffered disk reads: 954 MB in  3.00 seconds = 317.86 MB/sec
chuck@ubuntu:~$ 

$ sudo dd if=/dev/sdb1 of=/dev/null bs=1M count=50000
50000+0 records in
50000+0 records out
52428800000 bytes (52 GB, 49 GiB) copied, 22.3788 s, 2.3 GB/s

At the OS / VM level, they’re both screaming, yes?

If by scream, you mean no slow downs. Yeah, nothing is lagging or having issues when editing files, writing files (based on the commands above), etc.

Tab complete isn’t pausing unnecessarily long times for it to finish.

I also don’t see any other applications, docker or otherwise, having problems running as well.

Install Plex natively on the host and try it.

This is pointing more and more to Docker on Focal.

Just to confirm, what is the appropriate way to map the directory (if we should test that), to the existing configuration folder.

That way we can test the same mount, drive, and vm.

  1. mount the media in identical places (easiest)
  2. Create a systemd override file to move the “PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR” to the existing metadata directory
  3. In that override, we can also map to the appropriate UID/GID.
    ( I have the How-To here)

Done correctly, with UID / GID mapping, you could conceivably jump in and out of Docker on a whim

Let me make sure I configure it properly first, before actually running it. Will get back to you with the configuration.

Take your time. This is the fun and edgy stuff :slight_smile:

So we have this as the directory path:

ls -al /mnt/plex/config/Library/Application\ Support/Plex\ Media\ Server/
total 48
drwxr-xr-x 10 andrew andrew 4096 May 15 17:30  .
drwxr-xr-x  3 root   root   4096 May 10 13:23  ..
drwxr-xr-x  5 andrew andrew 4096 May 15 17:40  Cache
drwxr-xr-x  4 andrew andrew 4096 May 15 12:27  Codecs
drwxr-xr-x  3 andrew andrew 4096 May 10 13:23 'Crash Reports'
drwxr-xr-x  3 andrew andrew 4096 May 15 17:49  Logs
drwxr-xr-x  3 andrew andrew 4096 May 10 17:58  Media
drwxr-xr-x  6 andrew andrew 4096 May 10 23:32  Metadata
drwxr-xr-x  7 andrew andrew 4096 May 10 13:23 'Plug-in Support'
drwxr-xr-x  3 andrew andrew 4096 May 10 13:24  Plug-ins
-rw-r--r--  1 andrew andrew 1259 May 15 17:30  Preferences.xml
-rw-r--r--  1 andrew andrew    3 May 15 17:30  plexmediaserver.pid

We make the override.conf like so:

$ cat /etc/systemd/system/plexmediaserver.service.d/override.conf
#
# Customize Plex's config
#
# Identify this as a service override
[Service]
#
#  Move the data directory
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/mnt/plex/conf/Library/Application Support"
#
#  These values are only needed if you wish to change user & group
User=andrew
Group=andrew
#
# This is needed to change the default umask
UMask=0002

From there, install plex via deb package.

This should then point everything back to the same configuration that Docker would have had, right?

Is the media (from the Ubuntu perspective) the same place the Docker hosts expects it ? (source path name level) e.g /mymovies, /mytv, etc

If the Docker container was already pointing to ‘truth’ then you’re good to go

Ah, no, good catch. I could symlink them to the existing media. Assuming that would work?

I unfortunately, can’t simply copy the media to a new directory given the size.

i like to mount --bind /existing/name /what/we/want It avoid’s links.

it’s like when you move /var/lib/plexmediaserver to /home/plexdir without using an override file (before we had them)
mount --bind /home/plexdir /var/lib/plexmediaserver

(it looks like a symlink except a mount-chroot combo)

Maybe, but these are not block devices in my case, these are mounted through fuse. So I don’t know how it would react to changing the mount on the fly like this (apart from reworking all files.

Alright, well, for now they are symlinked. now the media is in the same data locations as the docker container.

So with the symlinks, I am still seeing SLOW QUERY, or link issues, but no timeouts yet. I will monitor a bit longer though:

May 15, 2020 18:26:14.167 [0x7f37b5ff3700] DEBUG - It took 90.000000 ms to retrieve 410 items.
May 15, 2020 18:26:14.172 [0x7f37b5ff3700] DEBUG - It took 20.000000 ms to retrieve 611 items.
May 15, 2020 18:26:14.178 [0x7f37b9ffb700] DEBUG - It took 130.000000 ms to retrieve 814 items.
May 15, 2020 18:26:14.195 [0x7f37b9ffb700] DEBUG - It took 70.000000 ms to retrieve 1036 items.
May 15, 2020 18:26:14.196 [0x7f37b5ff3700] DEBUG - It took 90.000000 ms to retrieve 814 items.
May 15, 2020 18:26:14.210 [0x7f37cffff700] DEBUG - Directory had 12 files, database had 0 files, can't skip.
May 15, 2020 18:26:14.221 [0x7f37b5ff3700] DEBUG - It took 90.000000 ms to retrieve 1036 items.
May 15, 2020 18:26:14.235 [0x7f37b3fef700] WARN - SLOW QUERY: It took 360.000000 ms to retrieve 51 items.
May 15, 2020 18:26:14.235 [0x7f37b3fef700] DEBUG - Setting container serialization range to [0, 50] (total=723)
May 15, 2020 18:26:14.240 [0x7f37b9ffb700] DEBUG - It took 160.000000 ms to retrieve 1243 items.
May 15, 2020 18:26:14.241 [0x7f37ac7e0700] WARN - SLOW QUERY: It took 370.000000 ms to retrieve 51 items.
May 15, 2020 18:26:19.159 [0x7f37b9ffb700] DEBUG - Setting container serialization range to [0, 15] (total=-1)
May 15, 2020 18:26:19.162 [0x7f37b2fed700] DEBUG - It took 100.000000 ms to retrieve 2 items.
May 15, 2020 18:26:19.172 [0x7f37acfe1700] DEBUG - It took 90.000000 ms to retrieve 611 items.
May 15, 2020 18:26:19.176 [0x7f37b87f8700] DEBUG - It took 90.000000 ms to retrieve 410 items.
May 15, 2020 18:26:19.193 [0x7f37acfe1700] DEBUG - It took 70.000000 ms to retrieve 814 items.
May 15, 2020 18:26:19.219 [0x7f37e9ffb700] WARN - Waited one whole second for a busy database.
May 15, 2020 18:26:19.226 [0x7f37b87f8700] DEBUG - It took 180.000000 ms to retrieve 611 items.
May 15, 2020 18:26:19.231 [0x7f37acfe1700] DEBUG - It took 140.000000 ms to retrieve 1036 items.
May 15, 2020 18:26:19.243 [0x7f37b5ff3700] WARN - SLOW QUERY: It took 220.000000 ms to retrieve 51 items.
May 15, 2020 18:26:19.243 [0x7f37b5ff3700] DEBUG - Setting container serialization range to [0, 50] (total=723)
May 15, 2020 18:26:19.251 [0x7f37b9ffb700] DEBUG - Setting container serialization range to [0, 15] (total=3849)
--
May 15, 2020 18:26:19.478 [0x7f37b87f8700] DEBUG - There were 1 top-level paths for Netflix Stand Up Specials.
May 15, 2020 18:26:19.484 [0x7f3846ffd700] DEBUG - Completed: [192.168.2.213:56601] 200 GET /hubs/home/recentlyAdded?type=2&includeExternalMedia=1 (26 live) TLS GZIP Page 0-49 375ms 38658 bytes (pipelined: 11)
May 15, 2020 18:26:19.484 [0x7f38477fe700] DEBUG - Completed: [192.168.2.30:55266] 200 GET /hubs/home/recentlyAdded?type=2&includeExternalMedia=1 (26 live) TLS GZIP Page 0-49 382ms 38658 bytes (pipelined: 10)
May 15, 2020 18:26:19.733 [0x7f37adfe3700] WARN - Held transaction for too long (../Library/MetadataItem.cpp:3590): 1.450000 seconds
May 15, 2020 18:26:19.733 [0x7f37adfe3700] DEBUG - Looking for path match for [/data/rclone/gmusic/Vladimir Horowitz/Mozart- Piano Sonatas, K 281, 330, 333, 540 & 485/07 - Mozart- Piano Sonata #13 In B Flat, K 333 - 1. Allegro.mp3]
May 15, 2020 18:26:19.733 [0x7f37ea7fc700] WARN - Took too long (1.560000 seconds) to start a transaction on ../Plugins/PluginDatabaseState.cpp:110
May 15, 2020 18:26:19.733 [0x7f37ea7fc700] WARN - Transaction that was running was started on thread 0x7f37adfe3700 at ../Library/MetadataItem.cpp:1037
May 15, 2020 18:26:19.733 [0x7f37ea7fc700] DEBUG - [com.plexapp.agents.lastfm] Sending command over HTTP (GET): /:/plugins/com.plexapp.agents.lastfm/messaging/function/TWVzc2FnZUtpdDpHZXRBcnRpc3RFdmVudHNGcm9tU29uZ2tpY2tCeUlk/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMQpzMzYKM2E3ZmRjMTgtNzYxOC00Y2U2LTlkYzYtMWRiY2ZiNzdlMDlkczExCmFydGlzdF9tYmlkcjAK
May 15, 2020 18:26:19.733 [0x7f37ea7fc700] DEBUG - HTTP requesting GET http://127.0.0.1:43325/:/plugins/com.plexapp.agents.lastfm/messaging/function/TWVzc2FnZUtpdDpHZXRBcnRpc3RFdmVudHNGcm9tU29uZ2tpY2tCeUlk/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMQpzMzYKM2E3ZmRjMTgtNzYxOC00Y2U2LTlkYzYtMWRiY2ZiNzdlMDlkczExCmFydGlzdF9tYmlkcjAK
May 15, 2020 18:26:19.733 [0x7f37e9ffb700] DEBUG - Push: Processing new content complete in 3.8 sec.
May 15, 2020 18:26:19.733 [0x7f37adfe3700] DEBUG - Skipping hash check, no size match for 15637253 bytes.
--
May 15, 2020 18:26:19.737 [0x7f3816ffd700] DEBUG - Statistics: (beb830169ab5b334-com-plexapp-android) Reporting active playback in state 0 of type 1 (scrobble: 0) for account 1
May 15, 2020 18:26:19.738 [0x7f38477fe700] DEBUG - Completed: [192.168.2.27:42450] 200 GET /:/timeline?audioStreamID=27504&bufferedTime=21469&duration=7830880&guid=com.plexapp.agents.imdb%3A%2F%2Ftt3501632%3Flang%3Den&key=%2Flibrary%2Fmetadata%2F1785&playbackTime=90629&playQueueItemID=1378&ratingKey=1785&state=playing&time=2587929&token=xxxxxxxxxxxxxxxxxxxx (26 live) TLS GZIP 351ms 500 bytes (pipelined: 26)
May 15, 2020 18:26:19.743 [0x7f37affe7700] DEBUG - Request: [127.0.0.1:41944 (Loopback)] GET /:/metadata/notify/changeItemState?librarySectionID=3&metadataItemID=47115&metadataType=10&state=-1&mediaState=analyzing (27 live) GZIP Signed-in Token (savantali)
May 15, 2020 18:26:19.743 [0x7f38477fe700] DEBUG - Completed: [127.0.0.1:41944] 200 GET /:/metadata/notify/changeItemState?librarySectionID=3&metadataItemID=47115&metadataType=10&state=-1&mediaState=analyzing (27 live) GZIP 0ms 166 bytes
May 15, 2020 18:26:19.743 [0x7f37b27ec700] WARN - Took too long (1.460000 seconds) to start a transaction on ../Library/MetadataItem.cpp:1017
May 15, 2020 18:26:19.743 [0x7f37b27ec700] WARN - Transaction that was running was started on thread 0x7f37ea7fc700 at ../Plugins/PluginDatabaseState.cpp:110
May 15, 2020 18:26:19.744 [0x7f37af7e6700] DEBUG - Request: [127.0.0.1:41950 (Loopback)] GET /:/metadata/notify/changeItemState?librarySectionID=3&metadataItemID=47115&metadataType=10&state=-1&mediaState=idle (28 live) GZIP Signed-in Token (savantali)
May 15, 2020 18:26:19.744 [0x7f37ba7fc700] DEBUG - Request: [127.0.0.1:41952 (Loopback)] GET /library/changestamp (28 live) GZIP Signed-in Token (savantali)
May 15, 2020 18:26:19.744 [0x7f38477fe700] DEBUG - Completed: [127.0.0.1:41950] 200 GET /:/metadata/notify/changeItemState?librarySectionID=3&metadataItemID=47115&metadataType=10&state=-1&mediaState=idle (28 live) GZIP 0ms 166 bytes
May 15, 2020 18:26:19.745 [0x7f38477fe700] DEBUG - Completed: [127.0.0.1:41952] 200 GET /library/changestamp (27 live) GZIP 0ms 481 bytes
May 15, 2020 18:26:19.746 [0x7f37adfe3700] DEBUG - Added new metadata item (Sonata for Piano no. 13 in B-flat major, K. 315c/333: I. Allegro) with ID 47125
--
May 15, 2020 18:26:27.584 [0x7f37b37ee700] DEBUG - There were 1 top-level paths for Netflix Stand Up Specials.
May 15, 2020 18:26:27.591 [0x7f38477fe700] DEBUG - Completed: [192.168.2.213:56609] 200 GET /hubs/home/recentlyAdded?type=2&includeExternalMedia=1 (24 live) TLS GZIP Page 0-49 228ms 38658 bytes (pipelined: 6)
May 15, 2020 18:26:27.616 [0x7f37adfe3700] WARN - Held transaction for too long (../Library/MetadataItem.cpp:3590): 0.790000 seconds
May 15, 2020 18:26:27.617 [0x7f37b27ec700] WARN - Took too long (0.780000 seconds) to start a transaction on ../Library/MetadataItem.cpp:8430
May 15, 2020 18:26:27.617 [0x7f37b27ec700] WARN - Transaction that was running was started on thread 0x7f37adfe3700 at ../Library/MetadataItem.cpp:1037
May 15, 2020 18:26:27.617 [0x7f37adfe3700] DEBUG - Native Scanner: Executed Add to Database stage in 17.68 sec.
May 15, 2020 18:26:27.617 [0x7f37b27ec700] DEBUG - Item 41105 (Sveriges roligaste ögonblick 55-46) Scanning metadata graphic elements in XML file "seasons/1/episodes"/5.xml
May 15, 2020 18:26:27.618 [0x7f37b27ec700] DEBUG - Item 41105 (Sveriges roligaste ögonblick 55-46) Scanning metadata graphic elements in XML file "seasons/1/episodes"/5.xml
May 15, 2020 18:26:27.619 [0x7f37b8ff9700] DEBUG - HTTP requesting GET http://127.0.0.1:42113/system/agents/media/get?guid=com%2Eplexapp%2Eagents%2Ethetvdb%3A%2F%2F80026%2F1%2F5%3Flang%3Dsv&mediaType=4&url=metadata%3A%2F%2Fseasons%2F1%2Fepisodes%2F5%2Fthumbs%2Fcom%2Eplexapp%2Eagents%2Ethetvdb_a93f3e5626c4603848d4532f2d673ae4fbcad189
May 15, 2020 18:26:27.622 [0x7f37b8ff9700] DEBUG - HTTP 200 response from GET http://127.0.0.1:42113/system/agents/media/get?guid=com%2Eplexapp%2Eagents%2Ethetvdb%3A%2F%2F80026%2F1%2F5%3Flang%3Dsv&mediaType=4&url=metadata%3A%2F%2Fseasons%2F1%2Fepisodes%2F5%2Fthumbs%2Fcom%2Eplexapp%2Eagents%2Ethetvdb_a93f3e5626c4603848d4532f2d673ae4fbcad189
May 15, 2020 18:26:27.623 [0x7f37b27ec700] DEBUG - Brought media local (metadata://seasons/1/episodes/5/thumbs/com.plexapp.agents.thetvdb_a93f3e5626c4603848d4532f2d673ae4fbcad189) in 0.0s.
--
May 15, 2020 18:26:33.497 [0x7f37b7ff7700] DEBUG - [LibraryTimeline] Scanner activity on section 3: 41 added, 0 deleted
May 15, 2020 18:26:33.513 [0x7f3846ffd700] DEBUG - Auth: authenticated user 1 as savantali
May 15, 2020 18:26:33.514 [0x7f37b07e8700] DEBUG - Request: [192.168.2.1:41262 (Subnet)] GET /library/metadata/47133 (25 live) TLS Signed-in Token (savantali)
May 15, 2020 18:26:33.515 [0x7f3846ffd700] DEBUG - Completed: [192.168.2.1:41262] 404 GET /library/metadata/47133 (25 live) TLS 1ms 288 bytes (pipelined: 1)
May 15, 2020 18:26:33.700 [0x7f38377fe700] DEBUG - [Notify] Now watching "/data/rclone/gmusic/Japandroids"
May 15, 2020 18:26:33.854 [0x7f37cffff700] DEBUG - Directory had 16 files, database had 0 files, can't skip.
May 15, 2020 18:26:34.009 [0x7f38377fe700] DEBUG - [Notify] Now watching "/data/rclone/gmusic/Japandroids/Japandroids-Celebration_Rock_(Australian_New_Zealand_Edition)-2012-pLAN9"
May 15, 2020 18:26:34.112 [0x7f3846ffd700] DEBUG - Auth: authenticated user 1 as savantali
May 15, 2020 18:26:34.112 [0x7f38477fe700] DEBUG - Auth: authenticated user 1 as savantali
May 15, 2020 18:26:34.112 [0x7f37b3fef700] DEBUG - Request: [192.168.2.30:55272 (Subnet)] GET /hubs/home/continueWatching?includeExternalMedia=1 (24 live) TLS Page 0-15 GZIP Signed-in Token (savantali)
May 15, 2020 18:26:34.112 [0x7f37ac7e0700] DEBUG - Request: [192.168.2.30:55273 (Subnet)] GET /hubs/home/onDeck?includeExternalMedia=1 (24 live) TLS Page 0-15 GZIP Signed-in Token (savantali)
--
May 15, 2020 18:26:40.101 [0x7f38477fe700] DEBUG - Completed: [192.168.2.1:41392] 200 GET /library/metadata/47107 (24 live) TLS 2ms 2804 bytes (pipelined: 1)
May 15, 2020 18:26:40.263 [0x7f38377fe700] DEBUG - [Notify] Now watching "/data/rclone/gmusic/Jason Mraz/I Won't Give Up - Single"
May 15, 2020 18:26:40.351 [0x7f3846ffd700] DEBUG - Auth: authenticated user 1 as savantali
May 15, 2020 18:26:40.351 [0x7f37b6ff5700] DEBUG - Request: [192.168.2.30:55274 (Subnet)] GET /statistics/bandwidth?timespan=6 (23 live) TLS GZIP Signed-in Token (savantali)
May 15, 2020 18:26:40.356 [0x7f3846ffd700] DEBUG - Completed: [192.168.2.30:55274] 200 GET /statistics/bandwidth?timespan=6 (23 live) TLS GZIP 4ms 3882 bytes (pipelined: 12)
May 15, 2020 18:26:40.411 [0x7f37ac7e0700] WARN - Waited one whole second for a busy database.
May 15, 2020 18:26:40.672 [0x7f38377fe700] DEBUG - [Notify] Now watching "/data/rclone/gmusic/Jason Mraz/Jason Mraz - Love Is A Four Letter Word (DeLuxe Edition) 2012 V0"
May 15, 2020 18:26:40.850 [0x7f38477fe700] DEBUG - Auth: authenticated user 1 as savantali
May 15, 2020 18:26:40.850 [0x7f37b9ffb700] DEBUG - Request: [192.168.2.30:55274 (Subnet)] GET /hubs/home/continueWatching?includeExternalMedia=1 (23 live) TLS Page 0-15 GZIP Signed-in Token (savantali)
May 15, 2020 18:26:40.850 [0x7f38477fe700] DEBUG - Auth: authenticated user 1 as savantali
May 15, 2020 18:26:40.850 [0x7f37b97fa700] DEBUG - Request: [192.168.2.30:55272 (Subnet)] GET /hubs/home/onDeck?includeExternalMedia=1 (23 live) TLS Page 0-15 GZIP Signed-in Token (savantali)
--
May 15, 2020 18:26:42.501 [0x7f3816ffd700] DEBUG - Setting container serialization range to [0, 15] (total=-1)
May 15, 2020 18:26:42.503 [0x7f3846ffd700] DEBUG - Completed: [192.168.2.213:56617] 200 GET /hubs/home/continueWatching?includeExternalMedia=1 (23 live) TLS GZIP Page 0-15 223ms 3041 bytes (pipelined: 15)
May 15, 2020 18:26:42.610 [0x7f37ba7fc700] DEBUG - Request: [127.0.0.1:42500 (Loopback)] GET /user/services/acoustid (24 live) GZIP Signed-in Token (savantali)
May 15, 2020 18:26:42.610 [0x7f38477fe700] DEBUG - Completed: [127.0.0.1:42500] 200 GET /user/services/acoustid (24 live) GZIP 0ms 469 bytes
May 15, 2020 18:26:42.644 [0x7f38377fe700] DEBUG - [Notify] Now watching "/data/rclone/gmusic/Jay Dee/jay_dee-donuts"
May 15, 2020 18:26:42.651 [0x7f37ac7e0700] WARN - Waited one whole second for a busy database.
May 15, 2020 18:26:42.925 [0x7f384f854700] DEBUG - Jobs: '/usr/lib/plexmediaserver/Plex Media Scanner' exit code for process 44345 is 0 (success)
May 15, 2020 18:26:42.925 [0x7f37aafdd700] DEBUG - Music Scanner: Matched 4 files in 12.1 sec (/data/rclone/gmusic/Vodge Diper/Vodge Diper & Jay Jacob - Next To You (2012) [320])
May 15, 2020 18:26:42.926 [0x7f37aafdd700] DEBUG - Matching 'Vodge Diper & Jay Jacob' (ID 47112) with agent tv.plex.agents.music
May 15, 2020 18:26:42.933 [0x7f3846ffd700] DEBUG - Auth: authenticated user 1 as savantali
May 15, 2020 18:26:42.933 [0x7f37b07e8700] DEBUG - Request: [192.168.2.30:55272 (Subnet)] GET /library/metadata/47113?includeExternalMedia=1&skipRefresh=1 (23 live) TLS GZIP Signed-in Token (savantali)
--
May 15, 2020 18:26:44.446 [0x7f38477fe700] DEBUG - Completed: [192.168.2.30:55271] 200 GET /hubs/home/recentlyAdded?type=2&includeExternalMedia=1 (24 live) TLS GZIP Page 0-49 338ms 38658 bytes (pipelined: 8)
May 15, 2020 18:26:44.462 [0x7f37b97fa700] DEBUG - Setting container serialization range to [0, 15] (total=-1)
May 15, 2020 18:26:44.463 [0x7f38477fe700] DEBUG - Completed: [192.168.2.213:56620] 200 GET /hubs/home/continueWatching?includeExternalMedia=1 (24 live) TLS GZIP Page 0-15 375ms 3041 bytes (pipelined: 11)
May 15, 2020 18:26:44.468 [0x7f37b1feb700] DEBUG - Setting container serialization range to [0, 15] (total=-1)
May 15, 2020 18:26:44.469 [0x7f38477fe700] DEBUG - Completed: [192.168.2.30:55272] 200 GET /hubs/home/continueWatching?includeExternalMedia=1 (24 live) TLS GZIP Page 0-15 364ms 3041 bytes (pipelined: 16)
May 15, 2020 18:26:44.891 [0x7f37ac7e0700] WARN - Waited one whole second for a busy database.
May 15, 2020 18:26:44.969 [0x7f38377fe700] DEBUG - [Notify] Now watching "/data/rclone/gmusic/Jay Illestrate/Jay Illestrate - THE SHOGUN FLOW [FLAC]"
May 15, 2020 18:26:45.343 [0x7f38377fe700] DEBUG - [Notify] Now watching "/data/rclone/gmusic/Jay Kill && The Hustle Standard"
May 15, 2020 18:26:45.357 [0x7f3846ffd700] DEBUG - Auth: authenticated user 1 as savantali
May 15, 2020 18:26:45.357 [0x7f3814ff9700] DEBUG - Request: [192.168.2.30:55272 (Subnet)] GET /statistics/bandwidth?timespan=6 (24 live) TLS GZIP Signed-in Token (savantali)
May 15, 2020 18:26:45.361 [0x7f3846ffd700] DEBUG - Completed: [192.168.2.30:55272] 200 GET /statistics/bandwidth?timespan=6 (24 live) TLS GZIP 4ms 4010 bytes (pipelined: 17)
--
May 15, 2020 18:26:47.111 [0x7f37ae7e4700] DEBUG - There were 1 top-level paths for Sherlock.
May 15, 2020 18:26:47.111 [0x7f37ae7e4700] DEBUG - There were 2 top-level paths for The Graham Norton Show.
May 15, 2020 18:26:47.112 [0x7f37ae7e4700] DEBUG - There were 2 top-level paths for What We Do in the Shadows.
May 15, 2020 18:26:47.112 [0x7f37ae7e4700] DEBUG - There were 1 top-level paths for People of Earth.
May 15, 2020 18:26:47.113 [0x7f37ae7e4700] DEBUG - There were 2 top-level paths for Westworld.
May 15, 2020 18:26:47.119 [0x7f37ac7e0700] WARN - Waited one whole second for a busy database.
May 15, 2020 18:26:47.120 [0x7f37ae7e4700] DEBUG - There were 1 top-level paths for Mister Rogers' Neighborhood.
May 15, 2020 18:26:47.121 [0x7f37ae7e4700] DEBUG - There were 1 top-level paths for Mr. Robot.
May 15, 2020 18:26:47.121 [0x7f37ae7e4700] DEBUG - There were 1 top-level paths for The Restaurant.
May 15, 2020 18:26:47.122 [0x7f37ae7e4700] DEBUG - There were 1 top-level paths for The Goldbergs (2013).
May 15, 2020 18:26:47.124 [0x7f37ae7e4700] DEBUG - There were 1 top-level paths for Top Gear.
--
May 15, 2020 18:26:49.331 [0x7f37b67f4700] DEBUG - It took 20.000000 ms to retrieve 410 items.
May 15, 2020 18:26:49.337 [0x7f37b67f4700] DEBUG - It took 10.000000 ms to retrieve 611 items.
May 15, 2020 18:26:49.338 [0x7f38477fe700] DEBUG - Auth: authenticated user 1 as savantali
May 15, 2020 18:26:49.338 [0x7f37b0fe9700] DEBUG - Request: [192.168.2.213:56618 (Subnet)] GET /hubs/home/recentlyAdded?type=1&personal=1&includeExternalMedia=1 (23 live) TLS Page 0-15 GZIP Signed-in Token (savantali)
May 15, 2020 18:26:49.339 [0x7f37b0fe9700] DEBUG - Setting container serialization range to [0, 15] (total=-1)
May 15, 2020 18:26:49.350 [0x7f37ac7e0700] WARN - Waited one whole second for a busy database.
May 15, 2020 18:26:49.359 [0x7f37ae7e4700] DEBUG - It took 100.000000 ms to retrieve 51 items.
May 15, 2020 18:26:49.360 [0x7f37ae7e4700] DEBUG - Setting container serialization range to [0, 50] (total=723)
May 15, 2020 18:26:49.363 [0x7f38477fe700] DEBUG - Auth: authenticated user 1 as savantali
May 15, 2020 18:26:49.363 [0x7f37ab7de700] DEBUG - Request: [192.168.2.30:55271 (Subnet)] GET /statistics/bandwidth?timespan=6 (23 live) TLS GZIP Signed-in Token (savantali)
May 15, 2020 18:26:49.369 [0x7f3846ffd700] DEBUG - Completed: [192.168.2.30:55271] 200 GET /statistics/bandwidth?timespan=6 (23 live) TLS GZIP 5ms 4114 bytes (pipelined: 16)
--
May 15, 2020 18:27:00.407 [0x7f37b3fef700] DEBUG - Setting container serialization range to [0, 50] (total=-1)
May 15, 2020 18:27:00.407 [0x7f37ea7fc700] DEBUG - It took 110.000000 ms to retrieve 200 items.
May 15, 2020 18:27:00.408 [0x7f37b97fa700] DEBUG - Setting container serialization range to [0, 50] (total=-1)
May 15, 2020 18:27:00.415 [0x7f37ea7fc700] DEBUG - It took 30.000000 ms to retrieve 410 items.
May 15, 2020 18:27:00.420 [0x7f37b3fef700] DEBUG - Setting container serialization range to [0, 50] (total=359)
May 15, 2020 18:27:00.424 [0x7f37ac7e0700] WARN - Waited one whole second for a busy database.
May 15, 2020 18:27:00.427 [0x7f37b0fe9700] DEBUG - It took 70.000000 ms to retrieve 200 items.
May 15, 2020 18:27:00.428 [0x7f38477fe700] DEBUG - Completed: [192.168.2.213:56632] 200 GET /hubs/home/recentlyAdded?type=8&includeExternalMedia=1 (29 live) TLS GZIP Page 0-50 22ms 23222 bytes (pipelined: 1)
May 15, 2020 18:27:00.433 [0x7f37ea7fc700] DEBUG - It took 70.000000 ms to retrieve 611 items.
May 15, 2020 18:27:00.438 [0x7f3846ffd700] DEBUG - Auth: authenticated user 1 as savantali
May 15, 2020 18:27:00.438 [0x7f3816ffd700] DEBUG - Request: [192.168.2.213:56632 (Subnet)] GET /hubs/home/recentlyAdded?type=1&personal=1&includeExternalMedia=1 (29 live) TLS Page 0-15 GZIP Signed-in Token (savantali)
--

Thought I replied directly to you (and sorry if I am pinging you too much not sure if you are actively watching. But based on above, it seems like it is still a problem.

And just to confirm that I am not running the container:

@apollo:~$ sudo docker container ls -a && sudo systemctl status plexmediaserver
CONTAINER ID        IMAGE                            COMMAND             CREATED             STATUS                     PORTS                    NAMES
57456a98d312        linuxserver/calibre-web:latest   "/init"             46 hours ago        Up 2 hours                 0.0.0.0:8083->8083/tcp   calibre-web
94eadfb75deb        d340c2262baf                     "/init"             46 hours ago        Exited (0) 2 hours ago                              calibre
a0e6f2812286        linuxserver/tautulli             "/init"             4 days ago          Up 2 hours                 0.0.0.0:8181->8181/tcp   tautulli
da66b62c575d        plexinc/pms-docker:latest        "/init"             5 days ago          Exited (0) 7 minutes ago                            plex
● plexmediaserver.service - Plex Media Server
     Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/plexmediaserver.service.d
             └─override.conf
     Active: active (running) since Fri 2020-05-15 18:23:19 PDT; 6min ago
    Process: 43401 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" (code=exited, status=0/SUC>
   Main PID: 43403 (Plex Media Serv)
      Tasks: 169 (limit: 6999)
     Memory: 1.9G
     CGroup: /system.slice/plexmediaserver.service
             ├─43403 /usr/lib/plexmediaserver/Plex Media Server
             ├─43437 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Resources/Plug-ins-ef515a800/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.19>
             ├─43490 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmediaserver/Resources/Tuner/Shared 1.19.3.2764-ef515a800 32600 /waitmu>
             ├─43923 Plex Plug-in [com.plexapp.agents.thetvdb] /usr/lib/plexmediaserver/Resources/Plug-ins-ef515a800/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-vers>
             ├─43993 Plex Plug-in [com.plexapp.agents.localmedia] /usr/lib/plexmediaserver/Resources/Plug-ins-ef515a800/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-v>
             ├─44126 Plex Plug-in [tv.plex.agents.music] /usr/lib/plexmediaserver/Resources/Plug-ins-ef515a800/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.>
             ├─44190 Plex Plug-in [com.plexapp.agents.plexthememusic] /usr/lib/plexmediaserver/Resources/Plug-ins-ef515a800/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --serv>
             ├─44247 Plex Plug-in [com.plexapp.agents.lastfm] /usr/lib/plexmediaserver/Resources/Plug-ins-ef515a800/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-versi>
             ├─44506 Plex Plug-in [com.plexapp.agents.lyricfind] /usr/lib/plexmediaserver/Resources/Plug-ins-ef515a800/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-ve>
             └─44880 /usr/lib/plexmediaserver/Plex Media Scanner --match --log-file-suffix  Matcher --files @/tmp/5f2c-dce0-40d5-9de2.txt

May 15 18:23:19 apollo systemd[1]: Starting Plex Media Server...
May 15 18:23:19 apollo systemd[1]: Started Plex Media Server.
May 15 18:26:51 apollo Plex Media Server[44126]: __code__:181: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.
lines 1-24/24 (END)

I did NOT install the plex pass version, as the docker container is the GA version:
plexmediaserver 1.19.3.2764-ef515a800

This should match the same version of the docker image.

My attempt to stress this is by:
Running the music library update
Update Metadata for a library
Play 4K video

And additionally after 20 minutes:

May 15, 2020 18:40:17.177 [0x7f3846ffd700] DEBUG - Auth: authenticated user 1 as savantali
May 15, 2020 18:40:17.177 [0x7f37b97fa700] DEBUG - Request: [192.168.2.30:55914 (Subnet)] GET /status/sessions (25 live) TLS GZIP Signed-in Token (savantali)
May 15, 2020 18:40:17.177 [0x7f37b97fa700] DEBUG - [Now] Adding 1 sessions.
May 15, 2020 18:40:17.178 [0x7f3846ffd700] DEBUG - Completed: [192.168.2.30:55914] 200 GET /status/sessions (25 live) TLS GZIP 0ms 5372 bytes (pipelined: 2)
May 15, 2020 18:40:17.275 [0x7f38377fe700] DEBUG - [Notify] Now watching "/data/rclone/gmusic/Nena/Nena - 1984 - 99 Luftballons [320 - MP3 - CD]"
May 15, 2020 18:40:17.310 [0x7f37ab7de700] WARN - Waited one whole second for a busy database.
May 15, 2020 18:40:17.368 [0x7f3846ffd700] DEBUG - Auth: authenticated user 1 as savantali
May 15, 2020 18:40:17.368 [0x7f37b7ff7700] DEBUG - Request: [192.168.2.30:55914 (Subnet)] GET /statistics/resources?timespan=6 (25 live) TLS GZIP Signed-in Token (savantali)
May 15, 2020 18:40:17.369 [0x7f3846ffd700] DEBUG - Completed: [192.168.2.30:55914] 200 GET /statistics/resources?timespan=6 (25 live) TLS GZIP 0ms 1002 bytes (pipelined: 3)
May 15, 2020 18:40:17.446 [0x7f3846ffd700] DEBUG - EventSource: Got event [data] '<Message address="24.7.56.27" port="32400" asyncIdentifier="abf3800c-5df7-49fa-a64c-15ea43a8ee8b" connectivity="1" command="notifyConnectivity"/>'
May 15, 2020 18:40:17.446 [0x7f3846ffd700] DEBUG - PubSub: Got notified of reachability for async identifier abf3800c-5df7-49fa-a64c-15ea43a8ee8b: 1 for 24.7.56.27:32400 (responded in 1526 ms)
--
May 15, 2020 18:40:19.364 [0x7f37b1feb700] DEBUG - There were 1 top-level paths for Top Gear.
May 15, 2020 18:40:19.366 [0x7f37b1feb700] DEBUG - There were 1 top-level paths for Seinfeld.
May 15, 2020 18:40:19.367 [0x7f37b1feb700] DEBUG - There were 1 top-level paths for Netflix Stand Up Specials.
May 15, 2020 18:40:19.374 [0x7f3846ffd700] DEBUG - Completed: [192.168.2.213:57006] 200 GET /hubs/home/recentlyAdded?type=2&includeExternalMedia=1 (26 live) TLS GZIP Page 0-49 171ms 38658 bytes (pipelined: 1)
May 15, 2020 18:40:19.397 [0x7f37ad7e2700] WARN - Held transaction for too long (../Library/MetadataItem.cpp:3590): 2.110000 seconds
May 15, 2020 18:40:19.397 [0x7f37ad7e2700] DEBUG - Native Scanner: Executed Add to Database stage in 32.99 sec.
May 15, 2020 18:40:19.399 [0x7f37ab7de700] DEBUG - Play progress on 1785 'Thor: Ragnarok' - got played 3418024 ms by account 1!
May 15, 2020 18:40:19.399 [0x7f37ab7de700] DEBUG - [Now] User is savantali (ID: 1)
May 15, 2020 18:40:19.399 [0x7f37ab7de700] DEBUG - [Now] Device is Android (SHIELD Android TV).
May 15, 2020 18:40:19.399 [0x7f37ab7de700] DEBUG - [Now] Profile is Android
May 15, 2020 18:40:19.399 [0x7f37ab7de700] DEBUG - [Now] Updated play state for /library/metadata/1785.

So at this point, I think it is safe to rule out docker as being the suspect (unless these large delays happen as well normally). I haven’t seen the DB completely lock up, but given time… I am expecting it to happen, as taking 39 seconds to write an insert shouldn’t be happening.

I could try the recommendation in the other thread I linked way earlier, but I don’t want to compromise the stock DB in case this does happen to be an issue yet.