Plex server constantly hanging/not available

Hi there, for those that don’t know me I’m incredibly new to all this. All answers ideally in the form of cut and paste commands :slight_smile:

I’ve got Plex Server up and running and have media in the library, however it is frequently - every 3 or so minutes - hanging/not being available to ant clients. The Server browser page says:

The app is loaded insecurely. You can attempt to use an insecure connection now.

After 1-5 minutes it’ll come back online, only to go offline again.

Periodically I also get this message in Plex:

You are not connected directly to DietPi so streaming quality may be limited. You may be able to connect directly to this server by changing your home network settings. Learn more

Any thoughts?

Can you have a look to system resource consumption once Plex is hanging.

You can use htop command for this.

It ‘appears’ to have settled now. Should it start being problematic again I’ll run the suggested command.

Thanks again

could be Plex was doing some media scanning, causing the system being busy.

It appears to happen when I attempt watching the media on my TV (via the Plex app on a Fire stick - which used to be fine when I was running Plex server off a very very old Mac Mini).

What info from the htop query will be of help? the ‘chart’ at the top has everything running at ~98%

Not sure if this is relevant or not, but in the Plex Server I’m seeing ‘files’ called Media 00023, Media 00024 etc being created

can you do a screen print from htop

looks like your system is under heavy load

There’s not as much in the red, and I am now getting bout 2 mins of playback, rather than 3 seconds

back to about .5 seconds of playback without freezing. Issue now being seen on iPhone Plex app playback too, so almost certainly server/Pi related

Not sure if relevant but I rebooted the Pi and SABnzbd took a while to start up (in a briowser window) and when it did it showed me this message:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/cheroot/", line 1810, in serve
  File "/usr/local/lib/python3.7/dist-packages/cheroot/", line 201, in run self._run(expiration_interval)
  File "/usr/local/lib/python3.7/dist-packages/cheroot/", line 218, in _run new_conn = self._from_server_socket(self.server.socket)
  File "/usr/local/lib/python3.7/dist-packages/cheroot/", line 272, in _from_server_sockets, ssl_env = self.server.ssl_adapter.wrap(s)
  File "/usr/local/lib/python3.7/dist-packages/cheroot/ssl/", line 278, in wrap sock, do_handshake_on_connect=True, server_side=True,
  File "/usr/lib/python3.7/", line 412, in wrap_socket session=session
  File "/usr/lib/python3.7/", line 853, in _create self.do_handshake()
  File "/usr/lib/python3.7/", line 1117, in do_handshake self._sslobj.do_handshake()
ssl.SSLError: [SSL: SSLV3_ALERT_BAD_CERTIFICATE] sslv3 alert bad certificate (_ssl.c:1056)

I’ve done status check on SABnzbd and et this:

root@DietPi:~# systemctl status sabnzbd
● sabnzbd.service - SABnzbd (DietPi)
   Loaded: loaded (/etc/systemd/system/sabnzbd.service; disabled; vendor preset: enabled)
   Active: active (running) since Fri 2021-07-02 14:29:30 BST; 12min ago
 Main PID: 1290 (python3)
    Tasks: 23 (limit: 4533)
   CGroup: /system.slice/sabnzbd.service
           └─1290 /usr/bin/python3 -OO /etc/sabnzbd/ -b 0 -f /etc/sabnzbd/sabnzbd.ini

Jul 02 14:34:02 DietPi python3[1290]:     s, ssl_env = self.server.ssl_adapter.wrap(s)
Jul 02 14:34:02 DietPi python3[1290]:   File "/usr/local/lib/python3.7/dist-packages/cheroot/ssl/", line 278, in wrap
Jul 02 14:34:02 DietPi python3[1290]:     sock, do_handshake_on_connect=True, server_side=True,
Jul 02 14:34:02 DietPi python3[1290]:   File "/usr/lib/python3.7/", line 412, in wrap_socket
Jul 02 14:34:02 DietPi python3[1290]:     session=session
Jul 02 14:34:02 DietPi python3[1290]:   File "/usr/lib/python3.7/", line 853, in _create

Not sure what this means but could the fact that SAB tok so long to get up and running point to an issue there that’s causing a load on the system?

it looks like you tried to activate SSL but the certificate is not valide

ssl.SSLError: [SSL: SSLV3_ALERT_BAD_CERTIFICATE] sslv3 alert bad certificate (_ssl.c:1056)

Thanks. Will try that command when back at home (now out for most of the weekend)

this is the error message only and not a command to execute :wink:

:wink: gotcha.

So every connection should be ‘unsecure’ / have SSL unchecked?

it depends. If you access SABnzbd locally only, no HTTPS / SSL is required.

Cool. Plex now purring like a happy kitten.

However, I think me tinkering with things has caused an issue, whereby SABnzbd is now refusing to connect to anything. Sonarr and Radarr can’t connect to it, and neither can a browser page.

I saw on the SAB forum that the following works

Shutdown SABnzbd, then open sabnzbd.ini and indeed remove the whole line with
Then start SABnzbd again.

How do I access and edit the sabnzbd.ini file and edit on a Mac. I’m running the Pi headless.

Many thanks

Scratch that. I followed the instruction here:

All sorted now. Amazing stuff.

Massive thanks to the Devs

Spoke too soon. Having watched about 2 hours of playback this afternoon the same problem is back. Connection with the server stops every few seconds.


how is system resource consumption the moment your playback stopp?

When the server’s connection fails the htop look OK (which I’m basing on the state of the four lines at the top of the screen. However, once the server reconnects almost every bar is red and up to the right.

The sever does reconnect without any intervention but it takes a few minutes, often longer, but it looses it’s connection approx every 30 seconds of playback.

EDIT: no other applications were running/active other than Plex Server (other than VPN)

at the moment I don’t have an idea what the issue could be. But maybe you can raise the question in parallel on plex GitHub

I reinstalled Plex Server, and tweaked some settings on the Plex Firestick app, and all appears to be working OK. I’m pretty sure the client app is downgrading some of the video quality but until I upgrade my client hardware I’m happy.

Thanks again for all your help.

I now have another question (!) but will start a new thread on that :wink: