Migrated settings.sql to new PMS CPU usage increases until unresponsive

Host OS#: Ubuntu 20.04
Docker Version#: 20.10.4
Server Version#: 1.23.4.4805

Docker-compose:
#PLEX Media Server
plex:
image: Package plex · GitHub
container_name: “plex”
network_mode: host
ports:
- 32400:32400
volumes:
- ${USERDIR}/docker/plex:/config
- /nfs/media/Movies:/movies
- /nfs/media/tv:/tv
- /nfs/media/Anime:/anime
- /nfs/media/Music:/music
environment:
- PUID=${PUID}
- PGID=${PGID}
- VERSION=public
- TZ=${TZ}
restart: unless-stopped

Attempting to migrate the view-state from the old server to the new server running in docker, no errors following the support article at move view state. The container, or at least the Plex media server service running on it quickly climbs in CPU utilization until it becomes unresponsive and any remote or local connection times out until the container is restarted.

Jul 16, 2021 20:54:15.115 [0x7fe599c29b38] Debug — Content-Length is -1 (of total: -1).
Jul 16, 2021 20:54:15.655 [0x7fe59b115b38] Warning — SLOW QUERY: It took 25500.000000 ms to retrieve 50 items.
Jul 16, 2021 20:54:19.859 [0x7fe59b115b38] Warning — SLOW QUERY: It took 31030.000000 ms to retrieve 50 items.
Jul 16, 2021 20:54:26.029 [0x7fe59f5f7b38] Debug — Completed: [x.x.x.x:56619] 200 GET /player/proxy/poll?deviceClass=pc&protocolVersion=3&protocolCapabilities=timeline%2Cplayback%2Cnavigation%2Cmirror%2Cplayqueues&timeout=1 (28 live) TLS GZIP 20014ms 5 bytes (pipelined: 12)
Jul 16, 2021 20:54:26.132 [0x7fe59f61ab38] Debug — Auth: authenticated user 1 as xxxxxxxxxxxx
Jul 16, 2021 20:54:26.151 [0x7fe59e885b38] Debug — Request: [x.x.x.xx:56619 (Subnet)] GET /player/proxy/poll?deviceClass=pc&protocolVersion=3&protocolCapabilities=timeline%2Cplayback%2Cnavigation%2Cmirror%2Cplayqueues&timeout=1 (28 live) TLS GZIP Signed-in Token (xxxxxxxxxxxx)
Jul 16, 2021 20:54:26.151 [0x7fe59e885b38] Debug — Content-Length is -1 (of total: -1).
Jul 16, 2021 20:54:28.609 [0x7fe59f5f7b38] Debug — Auth: authenticated user 1 as xxxxxxxxxxxx
Jul 16, 2021 20:54:28.609 [0x7fe59e885b38] Debug — Request: [x.x.x.x:42392 (WAN)] GET /library/recentlyAdded (29 live) Signed-in Token (xxxxxxxxxxxx)
Jul 16, 2021 20:54:28.853 [0x7fe59f5f7b38] Warning — [CERT] TLS connection came in with unrecognized plex.direct SNI name '72-193-220-25.aaa2cb85a08d4233af4bae04d37ed0c2.plex.direct'; using installed plex.direct cert
Jul 16, 2021 20:54:28.862 [0x7fe59f61ab38] Debug — CERT: incomplete TLS handshake: sslv3 alert certificate unknown

I believe the SLOW QUERY logs are eventually locking the system up and it cannot respond to TLS or any other requests for the server. Is this a process that I just need to let run, or can I force the running QUERY list to abort. Only 1 of the Libraries has had the view state synced over.

Should I stop the media server service, cancel the table merge, and restart the table merge and leave the media server service not running for an extended time? I would expect to see COLUMN LOCKED or something to that effect if it was because the media server was running while the writing to the view state table was occuring.

So the old PMS container was running when you did the dump and the new PMS container was running when you did the import to the destination DB ?

Both were stopped. I did the dump on the old PMS server with it stopped, and the import with the new one stopped. It returned me to a new line in the shell, so it seemed like it was done, but it could have been running in the background when I started the new container.

Just to satisfy the several users I stood up another container and have left the view state as new, everything unwatched.

I will continue to poke at the DB on the container having issues and hopefully find a solution.

After doing some extensive digging, I’m marking this as solved. In the new PMS I had changed the mount points for the media folders, this means I would need to change all the file paths in the exported database to match the new database for import. The SQL updates were pointing to locations that didn’t exist and the SQL server was just waiting for them to timeout, which was crashing PMS as a whole.

On top of this only my admin account would look correct with watch status since the Admin is usually identified as user 1, but the users I share with will get different user ids. I was trying to have the new server be treated as the same server, and would need to find the Plex preferences.xml file and copy the contents over to the new server.

For anyone who references this article in the future, if you migrate the preferences.xml you can’t then have both servers running at the same time as there will be a conflict so you can only run 1 at a time during your transition period.