Downgrading PMS

Hi,

Latest upgrade degraded PMS so it requires constant service restarts. Browsing through libraries works but it gets stuck even when trying to visualize a single picture. After PMS is restarted (not the server but the service) PMS works fine again for some time.
I’m using an Ubuntu-64 server that had always excellent performance.

My question here isn’t about analyzing what is happening as I don’t have the time these days but about downloading previous version (I deleted it :slight_smile: so I can downgrade PMS to previous release.

Using now 1.8.1.4139

Thanks

BTW, a clue if anyone is interested. Restarting the service takes a long time (3-5 min) compared to previous release which could be restarted in a few seconds.

May I see your Log files (settings - server - help - download logs)? The ZIP file it gives you is what I need to see.

Your system should not require that much time. Given the amount of time you’re describing, my first inspection point would be database optimization. It can become fragmented even though it does optimize itself along the way and there is the ability to perform a full self-optimization as part of your Scheduled Tasks every week.

Chuck,

Thanks. I’ve sent you a dropbox link to the zip file on a private message.

All maintenance tasks are ticked to be performed, including the weekly db optimization.

Thanks for the logs.

Now for the not-so-good news.

You’re having a lot of internet connectivity issues. PMS gets a connection (getPublicIP), find Plex.tv, then loses it a few seconds later.

Aug 22, 2017 11:27:18.492 [0x7f30373ff700] DEBUG - PublicAddressManager: Got public IP from http://plex.tv: X.XXX.XX.XX
Aug 22, 2017 11:27:18.646 [0x7f3020fff700] DEBUG - HTTP 200 response from PUT https://plex.tv/devices/f398a11ba649598dc95482beb5a3e837e3790ee1?Connection[][uri]=http://192.168.1.11:32400&httpsEnabled=1&httpsRequired=0&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx
Aug 22, 2017 11:27:26.096 [0x7f3039ffe700] DEBUG - handleStreamRead code 335544539: short read
Aug 22, 2017 11:27:26.137 [0x7f303a7ff700] DEBUG - Auth: We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Aug 22, 2017 11:27:26.137 [0x7f303a7ff700] DEBUG - Auth: authenticated user 1 as asagarra
Aug 22, 2017 11:27:26.137 [0x7f303a7ff700] DEBUG - Auth: Came in with a super-token, authorization succeeded.
Aug 22, 2017 11:27:26.137 [0x7f300a7f5700] DEBUG - Request: [192.168.1.36:54716 (Subnet)] GET /player/proxy/poll?deviceClass=pc&protocolVersion=1&protocolCapabilities=timeline%2Cplayback%2Cnavigation%2Cmirror%2Cplayqueues&timeout=1 (5 live) TLS GZIP Signed-in Token (asagarra)
Aug 22, 2017 11:27:26.138 [0x7f300a7f5700] DEBUG - Beginning read from two-way stream.
Aug 22, 2017 11:27:33.387 [0x7f3039ffe700] DEBUG - EventSource: Connecting to 109.237.24.233
Aug 22, 2017 11:27:33.387 [0x7f3039ffe700] DEBUG - EventSource: Resolved to 109.237.24.233
Aug 22, 2017 11:27:33.497 [0x7f303a7ff700] DEBUG - EventSource: Connected in 74 ms.
Aug 22, 2017 11:27:33.497 [0x7f303a7ff700] DEBUG - EventSource: Wrote data, reading reply.
Aug 22, 2017 11:27:33.595 [0x7f3039ffe700] DEBUG - EventSource: Read HTTP reply header.
Aug 22, 2017 11:27:33.595 [0x7f3039ffe700] DEBUG - MyPlex: We appear to have regained Internet connectivity.

Almost immediately, it loses it and resets

Aug 22, 2017 11:29:34.962 [0x7f3039ffe700] DEBUG - PublicAddressManager: Obtaining public address and mapping port.
Aug 22, 2017 11:29:34.962 [0x7f3009ff4700] DEBUG - PublicAddressManager: Obtaining public IP.
Aug 22, 2017 11:29:34.962 [0x7f3039ffe700] DEBUG - EventSource: Failure in IdleTimeout (0 - Success).
Aug 22, 2017 11:29:34.962 [0x7f3039ffe700] DEBUG - MyPlex: We appear to have lost Internet connectivity, resetting device URL cache.
Aug 22, 2017 11:29:34.962 [0x7f3009ff4700] DEBUG - HTTP requesting GET http://plex.tv/pms/:/ip
Aug 22, 2017 11:29:34.962 [0x7f3039ffe700] ERROR - EventSource: Retrying in 15 seconds.

This cycle continues throughout your logs.

I can only suggest a steady ping test and/or iperf test to track down why you’re losing connection / packets. The last I saw this there was a damaged / worn ethernet cable. If you’re using Wifi then your server is not getting the minimum connectivity needed.

Thanks a lot for the time spent. I am using a wired connection but truth is I moved the server recently and used a different eth cable. I’ll replace it immediately and hope for the best.
If that’s the thing that ain’t bad news at all but great instead!
Again, tx a lot for your help. You guys make this thing great!
I’ll comment after replacing the eth cable.

BTW… wifi connection for the server? worst idea ever! :slight_smile:

I’ve tried speedtest on the server before replacing the cable and, unfortunately, seems to be working just fine:
Retrieving speedtest.net configuration…
Retrieving speedtest.net server list…
Testing from Movistar (2.137.86.65)…
Selecting best server based on latency…
Hosted by CSUC (Barcelona) [4.25 km]: 10.238 ms
Testing download speed…
Download: 301.95 Mbit/s
Testing upload speed…
Upload: 149.08 Mbit/s

Will change the cable anyway, just in case.

Also, JUST for prudence sake,

Start a ping, let it run. After an hour , interrupt it (or hit ctrl-T for some machines) and see the stats to that point… Check for dropped packets

Hi Chuck,

Again, thanks for your advice.
I’ve ran more nw tests and they look just fine.
after 35’ of continuous pings from the server to the router:

— 192.168.1.1 ping statistics —
1718 packets transmitted, 1718 received, 0% packet loss, time 1716994ms
rtt min/avg/max/mdev = 0.248/0.503/33.110/2.017 ms

I ran a ping to google dns in parallel:
— 8.8.8.8 ping statistics —
1623 packets transmitted, 1623 received, 0% packet loss, time 1624370ms
rtt min/avg/max/mdev = 10.618/11.124/45.753/1.833 ms

I have wifi issues on some clients side but server connectivity looks fine to me.
I’ve also unsuccessfully tried to identify triggers to the problem. Server works fine for a while until it degrades its performance (plexmediaserver service, not the ubuntu system). As explained, even stopping the service takes a long time when the server is at that stage.
I noticed also some issues with plex not creating metadata for tv shows episodes after adding. The ‘Analyze’ option wasn’t working and the only solution was to move them out and back in. I’ve ran a metadata refresh.
Pictures seem to be problematic as well. I added a few hundreds at once (a week ago) and I’m still getting some of this popups of pictures being analyzed.

Anyway to do a stronger db clean up?
BTW, this started happening right after last upgrade so that’s why I asked at first for the download link to the previous release.

There is always a stronger method :smiley:

I’m not convinced we’ve found the root cause unless the photos are being that problematic (you added that many haha)

The stronger database cleanup

  1. Stop PMS
  2. Go to the terminal
  3. Export the DB to a text file
  4. Rename the existing DB
  5. Import the text file back into a fresh DB
  6. Make user plex the owner again
  7. Start PMS.

It looks like this:

sh-4.3# pwd
/home/plexdir/Library/Application Support/Plex Media Server
sh-4.3# cd Plug-in\ Support/Databases/
sh-4.3# ls -la
total 13428
drwxr-xr-x. 2 plex plex     4096 Aug 11 03:10 .
drwxr-xr-x. 7 plex plex     4096 Aug 10 23:01 ..
-rw-r--r--. 1 plex plex    69632 Aug 11 01:57 com.plexapp.dlna.db
-rw-r--r--. 1 plex plex    32768 Aug 11 01:57 com.plexapp.dlna.db-shm
-rw-r--r--. 1 plex plex   292552 Aug 11 01:57 com.plexapp.dlna.db-wal
-rw-r--r--. 1 plex plex   303104 Aug 11 01:15 com.plexapp.plugins.library.blobs.db
-rw-r--r--. 1 plex plex 13035520 Aug 11 03:10 com.plexapp.plugins.library.db
sh-4.3# echo .dump | sqlite3 com.plexapp.plugins.library.db > PMS-db.txt
sh-4.3# ls -la
total 26000
drwxr-xr-x. 2 plex plex     4096 Aug 24 10:21 .
drwxr-xr-x. 7 plex plex     4096 Aug 10 23:01 ..
-rw-r--r--. 1 plex plex    69632 Aug 11 01:57 com.plexapp.dlna.db
-rw-r--r--. 1 plex plex    32768 Aug 11 01:57 com.plexapp.dlna.db-shm
-rw-r--r--. 1 plex plex   292552 Aug 11 01:57 com.plexapp.dlna.db-wal
-rw-r--r--. 1 plex plex   303104 Aug 11 01:15 com.plexapp.plugins.library.blobs.db
-rw-r--r--. 1 plex plex 13035520 Aug 11 03:10 com.plexapp.plugins.library.db
-rw-r--r--. 1 root root 12872998 Aug 24 10:21 PMS-db.txt
sh-4.3# mv com.plexapp.plugins.library.db com.plexapp.plugins.library.db-orig
sh-4.3# sqlite3 com.plexapp.plugins.library.db < PMS-db.txt
sh-4.3# chown plex.plex com.plexapp.plugins.library.db
sh-4.3# ls -la
total 38088
drwxr-xr-x. 2 plex plex     4096 Aug 24 10:22 .
drwxr-xr-x. 7 plex plex     4096 Aug 10 23:01 ..
-rw-r--r--. 1 plex plex    69632 Aug 11 01:57 com.plexapp.dlna.db
-rw-r--r--. 1 plex plex    32768 Aug 11 01:57 com.plexapp.dlna.db-shm
-rw-r--r--. 1 plex plex   292552 Aug 11 01:57 com.plexapp.dlna.db-wal
-rw-r--r--. 1 plex plex   303104 Aug 11 01:15 com.plexapp.plugins.library.blobs.db
-rw-r--r--. 1 plex plex 12378112 Aug 24 10:22 com.plexapp.plugins.library.db
-rw-r--r--. 1 plex plex 13035520 Aug 11 03:10 com.plexapp.plugins.library.db-orig
-rw-r--r--. 1 root root 12872998 Aug 24 10:21 PMS-db.txt
sh-4.3# 

In the above, if there was a com.plexapp.plugins.library.db-shm or a com.plexapp.plugins.library.db-wal, they would be deleted. Under normal operation, they would be properly removed during ishutdown. They are cache files.

Hi Chuck (and anyone else reading)

Sorry for taking long to respond now. I can’t tell what really did the trick but it seems the server is working fine now without performing the ‘stronger db clean up’.
I do think, though, it had something to do with some db corruption/indexers, whatever… but it seems to work just fine now so, I won’t ‘touch it’ until the issue comes up again. I’ll tick on yes to the db stronger clean up as someone might find that useful in case of db performance/corrpution.

Many thanks for your interest, support and help!

I love Plex! You guys are doing something really great here!