Docker container keeps loosing connection/access - DB constantly busy

This removes Docker from the equation and is what I expected.
Docker is essentially a chroot environment.

Where this is at now is the VM / host itself.

What was this running successfully on before moving here?

Very similar configuration.

ESXi.6.7u3, guest VM - Ubuntu 18.04.3 LTS

I don’t believe I have the previous VM files anymore (at least not on the esxi host), I can’t recall if there were slow queries or not.

So basically: the biggest change is going from 18.04.3 to 20.04

hold up.

ESXi 6.x versus 7.0 ?

Yes, meant to say biggest guest change.

But yes, esxi was also upgraded from 6.7 to 7.0.

Now I need to ask you to go research.

Ryzen on 6.7 vs 7.0

I did a quick google search and there are changes.

This might be the exact question to ask in their forums too.

I can do that, however, I also can easily downgrade back to esxi 6.7u3 if need be.

I did originally update the esxi host to 7.0 with the 6.7u3 VM that was generated and didn’t notice these slowdown/issue that were happening.

What I mean by this is:
esxi host 6.7u3. ------> esxi host 7.0
VM containing plex ------> no change

whatever is easiest for you.

You see above in the i/o tests where the bottlenecks are.

Once those are solved then I would say it’s safe to move forward.

This is behaving much like a previous Ubuntu / ESXi incompatibility with the old VMNET3 network driver (crashed the OS when LRO was enabled). The only solution there was to disable the emulation and go to E1000e

I made a forum post in the VMware Forums for this.

https://communities.vmware.com/message/2949849#2949849

As a side note, wouldn’t it be a good idea for the Plex dashboard to actually show the disk bandwidth/io vs system based (or all other) io stats on disk?

Have you considered running this in GKE?

No, as that costs money, and I am not trying to pay for a self hosted at home media system.
It would also be a completely different venture, as I would have to host the media backends somewhere/come up with my own docker container (which I am not trying to yet).

Ok. Sounds good. I’m going to try it in their free tier, got an idea about media hosting too. at-home systems cost money too and usually restrict features, I’ve got well over 80tb at home so I get it.

If you look at the free tier GKE configuration/rules (https://cloud.google.com/free/docs/gcp-free-tier), you will notice that it states it will follow the compute rules for the standard tier:
Each user node is charged at standard Compute Engine pricing

And when watching media, that means the egress traffic will be enormous. A single 4K movie can be upwards of 40GB.

In addition, I don’t really want to use Google Kubernetes Engine, would rather learn from k8s from scratch. Besides that, I don’t think it will turn out cheap if you try and use it in GKE anyways for other reasons.

I found another thread that mentioned the same form of issues:

It seems like Plex is not equipped to handle these larger libraries (all of mine are over several TB). I did eventually switch back to Docker, and run the PRAGMA command, and that has sorted it out.

I no longer am receiving the database lockups, and plex is (as far as I can see) running without issue. There is a slightly higher RAM usage, but, I can easily take that compared to the DB lockups and freezing.

The only other alternative I see (seeing as I am not getting a lot of comments on VMware forums), is to create a new VMDK that is roughly the same size, move everything over, and then start plex back up again and see if it that solves).

Unless the filesystem is not tuned properly (which it seems like it is).

I noticed after our testing that the Plex Media Scanner log files are not being created anymore (I tried touching a file to see if it would help initialize new logs, it did not).

-rw-r--r--  1 andrew andrew    41528 May 17 09:33 'Plex Media Scanner Analysis.1.log'
-rw-r--r--  1 andrew andrew   135672 May 17 09:23 'Plex Media Scanner Analysis.2.log'
-rw-r--r--  1 andrew andrew    60161 May 17 09:00 'Plex Media Scanner Analysis.3.log'
-rw-r--r--  1 andrew andrew    53642 May 17 08:38 'Plex Media Scanner Analysis.4.log'
-rw-r--r--  1 andrew andrew    36389 May 17 08:27 'Plex Media Scanner Analysis.5.log'
-rw-r--r--  1 andrew andrew     8042 May 17 09:58 'Plex Media Scanner Analysis.log'
-rw-r--r--  1 andrew andrew   236157 May 17 05:02 'Plex Media Scanner Chapter Thumbnails.1.log'
-rw-r--r--  1 andrew andrew   328655 May 17 05:01 'Plex Media Scanner Chapter Thumbnails.2.log'
-rw-r--r--  1 andrew andrew   379467 May 17 05:01 'Plex Media Scanner Chapter Thumbnails.3.log'
-rw-r--r--  1 andrew andrew   261307 May 17 05:01 'Plex Media Scanner Chapter Thumbnails.4.log'
-rw-r--r--  1 andrew andrew   350803 May 17 05:00 'Plex Media Scanner Chapter Thumbnails.5.log'
-rw-r--r--  1 andrew andrew   308068 May 17 05:02 'Plex Media Scanner Chapter Thumbnails.log'
-rw-r--r--  1 andrew andrew     3138 May 17 03:05 'Plex Media Scanner Deep Analysis.1.log'
-rw-r--r--  1 andrew andrew     3132 May 17 03:05 'Plex Media Scanner Deep Analysis.2.log'
-rw-r--r--  1 andrew andrew     2902 May 17 03:03 'Plex Media Scanner Deep Analysis.3.log'
-rw-r--r--  1 andrew andrew     3088 May 17 03:01 'Plex Media Scanner Deep Analysis.4.log'
-rw-r--r--  1 andrew andrew     3026 May 17 02:59 'Plex Media Scanner Deep Analysis.5.log'
-rw-r--r--  1 andrew andrew    23710 May 17 03:43 'Plex Media Scanner Deep Analysis.log'
-rw-r--r--  1 andrew andrew    87923 May 17 09:51 'Plex Media Scanner Matcher.1.log'
-rw-r--r--  1 andrew andrew     7720 May 17 09:51 'Plex Media Scanner Matcher.2.log'
-rw-r--r--  1 andrew andrew    22397 May 17 09:51 'Plex Media Scanner Matcher.3.log'
-rw-r--r--  1 andrew andrew    22591 May 17 09:51 'Plex Media Scanner Matcher.4.log'
-rw-r--r--  1 andrew andrew     8863 May 17 09:51 'Plex Media Scanner Matcher.5.log'
-rw-r--r--  1 andrew andrew    97848 May 17 10:14 'Plex Media Scanner Matcher.log'
-rw-r--r--  1 andrew andrew  4209670 May 15 13:20 'Plex Media Scanner.1.log'
-rw-r--r--  1 andrew andrew  5368149 May 15 13:00 'Plex Media Scanner.2.log'
-rw-r--r--  1 andrew andrew  4140331 May 15 10:45 'Plex Media Scanner.3.log'
-rw-r--r--  1 andrew andrew  1536971 May 15 10:13 'Plex Media Scanner.4.log'
-rw-r--r--  1 andrew andrew  4114899 May 15 10:11 'Plex Media Scanner.5.log'
-rw-rw-r--  1 andrew andrew        0 May 17 09:58 'Plex Media Scanner.log'

This seems quite odd, is there a further way to debug/troubleshoot this?

if logs are not being created then there must be a permissions problem.

which UID/GID is PMS running as? UID/GID which owns the directories?

Where is APPLICATION_SUPPORT_DIR ?

I don’t see a permissions issue anywhere:

$ ls -al /mnt/plex/config/Library/Application\ Support/Plex\ Media\ Server/Logs/
total 55008
drwxr-xr-x  3 andrew andrew     4096 May 17 10:36  .
drwxr-xr-x 10 andrew andrew     4096 May 17 10:29  ..
$ ls -al /mnt/plex/config/Library/Application\ Support/Plex\ Media\ Server/Logs/ | grep -i Scanner.log
-rw-rw-r--  1 andrew andrew        0 May 17 09:58 Plex Media Scanner.log

Docker has the PGID / PUID as 1000, the override file also was listed as 1000/andrew.

 id andrew
uid=1000(andrew) gid=1000(andrew)
$ sudo docker inspect plex | grep -i 1000
                "PLEX_UID=1000",
                "PLEX_GID=1000",
$ 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/config/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

It’s not PLEX_UID or PLEX_GID, it’s PUID, and PGID ,

as per:

docker create \
  --name=plex \
  --net=host \
  -e PUID=1000 \
  -e PGID=1000 \
  -e VERSION=docker \
  -e UMASK_SET=022 `#optional` \

https://hub.docker.com/r/linuxserver/plex/

I’m also curious why a systemd override file is involved here ???

I am not using the linuxserver containers, I am using Plex’s official containers.
https://hub.docker.com/r/plexinc/pms-docker/

These parameters are usually not required but some special setups may benefit from their use. As in the previous section, each is treated as first-run parameters only:

PLEX_UID The user id of the plex user created inside the container.
PLEX_GID The group id of the plex group created inside the container

I just wanted to provide what we historically did with the override.conf file, to show that there were not any changes when we installed plex directly on the system.

is docker using a network mount for the /config ?