Plex server constantly hanging/not available Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
TWHH
Posts: 56
Joined: Tue Jun 29, 2021 10:27 pm

Plex server constantly hanging/not available

Post by TWHH »

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 :)

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?
User avatar
Joulinar
Posts: 5149
Joined: Sat Nov 16, 2019 12:49 am

Re: Plex server constantly hanging/not available

Post by Joulinar »

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

You can use htop command for this.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
TWHH
Posts: 56
Joined: Tue Jun 29, 2021 10:27 pm

Re: Plex server constantly hanging/not available

Post by TWHH »

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

Thanks again
User avatar
Joulinar
Posts: 5149
Joined: Sat Nov 16, 2019 12:49 am

Re: Plex server constantly hanging/not available

Post by Joulinar »

could be Plex was doing some media scanning, causing the system being busy.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
TWHH
Posts: 56
Joined: Tue Jun 29, 2021 10:27 pm

Re: Plex server constantly hanging/not available

Post by TWHH »

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
User avatar
Joulinar
Posts: 5149
Joined: Sat Nov 16, 2019 12:49 am

Re: Plex server constantly hanging/not available

Post by Joulinar »

can you do a screen print from htop

looks like your system is under heavy load
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
TWHH
Posts: 56
Joined: Tue Jun 29, 2021 10:27 pm

Re: Plex server constantly hanging/not available

Post by TWHH »

There's not as much in the red, and I am now getting bout 2 mins of playback, rather than 3 seconds
Attachments
tomhosking_—_ssh_root_192_168_1_65_—_189×56.png
TWHH
Posts: 56
Joined: Tue Jun 29, 2021 10:27 pm

Re: Plex server constantly hanging/not available

Post by TWHH »

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:

Code: Select all

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/cheroot/server.py", line 1810, in serve self._connections.run(self.expiration_interval)
  File "/usr/local/lib/python3.7/dist-packages/cheroot/connections.py", line 201, in run self._run(expiration_interval)
  File "/usr/local/lib/python3.7/dist-packages/cheroot/connections.py", line 218, in _run new_conn = self._from_server_socket(self.server.socket)
  File "/usr/local/lib/python3.7/dist-packages/cheroot/connections.py", line 272, in _from_server_sockets, ssl_env = self.server.ssl_adapter.wrap(s)
  File "/usr/local/lib/python3.7/dist-packages/cheroot/ssl/builtin.py", line 278, in wrap sock, do_handshake_on_connect=True, server_side=True,
  File "/usr/lib/python3.7/ssl.py", line 412, in wrap_socket session=session
  File "/usr/lib/python3.7/ssl.py", line 853, in _create self.do_handshake()
  File "/usr/lib/python3.7/ssl.py", 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:

Code: Select all

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
     Docs: https://sabnzbd.org/wiki/
 Main PID: 1290 (python3)
    Tasks: 23 (limit: 4533)
   CGroup: /system.slice/sabnzbd.service
           └─1290 /usr/bin/python3 -OO /etc/sabnzbd/SABnzbd.py -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/builtin.py", 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/ssl.py", 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/ssl.py", 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?
User avatar
Joulinar
Posts: 5149
Joined: Sat Nov 16, 2019 12:49 am

Re: Plex server constantly hanging/not available

Post by Joulinar »

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

Code: Select all

ssl.SSLError: [SSL: SSLV3_ALERT_BAD_CERTIFICATE] sslv3 alert bad certificate (_ssl.c:1056)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
TWHH
Posts: 56
Joined: Tue Jun 29, 2021 10:27 pm

Re: Plex server constantly hanging/not available

Post by TWHH »

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