Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Support] binhex - Plex Pass

Featured Replies

Does anyone know how to stop PMS in this docker? I have tried kill command but the service just starts back up. I need to stop it to run repairs on the db files.

  • Replies 1.8k
  • Views 415.2k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • apparently plex has removed the redirection to /web, so now you need to append /web to the url, for example:- http://192.168.1.10:32400/web

  • Hi all, the issue where the container is stopping MAY of been related to the introduction of healthchecking, this checks to see if the internet connection is operational, if not the container is marke

  • I obviously don't reclaim my Plex server very often (this might even be the first time!), but i went through it this morning and it was relatively painless, FWIW here are my notes (some of this is fro

Posted Images

  • Author
6 hours ago, HiImAWalrus said:

./dbrepair.sh: line 18: kill: 67

257: arguments must be process or job IDs

i will fix this, but it looks like there was no process to kill, so the script should still execute correctly.

  • Author
48 minutes ago, comfox said:

Does anyone know how to stop PMS in this docker? I have tried kill command but the service just starts back up. I need to stop it to run repairs on the db files.

there is no restart of the service, you sure about that?

34 minutes ago, binhex said:

there is no restart of the service, you sure about that?

Yep. kill command would kill that PID but then a new PID would spin up.

I ended up searching through the this posts history and found your db fix script so I am using that now. Yours stops PMS properly.

Maybe for a feature request you could provide a script to stop PMS in this container incase anyone wants to use DBRepair instead of your built in one.

I am hoping this fixes my Plex issues, otherwise I have no idea what to do next.

  • Author
6 minutes ago, comfox said:

I ended up searching through the this posts history and found your db fix script so I am using that now. Yours stops PMS properly.

ahh so you wern't using my script, gotcha, ok well my script simply does a kill of the pid, there nothing too clever going on here, and as mentioned previously, there is no auto restart of pms, so whatever script you were using does not stop/kill pms would be my conclusion.

57 minutes ago, binhex said:

ahh so you wenr't using my script, gotcha, ok well my script simply does a kill of the pid, there nothing too clever going on here, and as mentioned previously, there is no auto restart of pms, so whatever script you were using does not stop/kill pms would be my conclusion.

I am using your script now...

I ran option 2 and got this error...

Runtime error near line 1: database or disk is full (13)

3 hours ago, binhex said:

i will fix this, but it looks like there was no process to kill, so the script should still execute correctly.

It ran the script successfully (it seems) however PMS was still running and available during that time. Thanks for your work!

Hmmm...any plex experts there that can help me out?

Having some really strange things happening and I can't find any logs to point to what is going one.

Two issues are happening. Either Plex says my server is offline and it can't access it OR I go to play something and the play screen just sits there and spins and spins.

I have debug logging turned on and I can't seem to figure anything out.

I have run the db fix script and on selection two it errored an out of space error. I increased the docker size and I will try again running it.

This only started like 5 - 6 days ago...not idea where to turn next.

OK, reran the db repair tool and got this error...

Runtime error near line 1: database disk image is malformed (11)

Edited by comfox

  • Author
13 hours ago, comfox said:

disk is full

is it? check unraid web ui dashboard and look at docker utilitsation under system, if so you need to sort that out.

3 hours ago, binhex said:

This is what I was running, but received the out of disk error

3 hours ago, binhex said:

is it? check unraid web ui dashboard and look at docker utilitsation under system, if so you need to sort that out.

No, it's not out of disk space until I run the repair script, then the repair script eats up all my docker space. I have doubled the size and I am running it again.

9 hours ago, comfox said:

This is what I was running, but received the out of disk error

No, it's not out of disk space until I run the repair script, then the repair script eats up all my docker space. I have doubled the size and I am running it again.

For anyone who comes here in the future, I have resolved the issue.

The built in Binhex db repair utility didn't fix it, but I did use the script. What ended up being the problem was a phantom out of space issue at the block level of the btrfs for the cache drive. This kept causing the db to become corrupted. Unfortunately there were very few indicators of this issue in any logs until I used the ChuckPa/DBRepair tool. This allowed for me to finally get some errors in the log file which were BTRFS error (device loop2) here is how I ultimately fixed it.

Step 1: Console into the Binhex Plex docker and run /home/nobody/dbrepair.sh

Select option 1. Although I looped through ALL steps this didn't actually fix anything, BUT it did allow me to kill PMS as I couldn't figure out how to kill it any other way.

Step 2: While still consoled into the plex Docker, Run DBRepair tool and select option '2' which is the automatic fix. This FINALLY caused the errors to show up in the regular unRAID logs.

Step 3: Console into the unRAID server. Run 'btrfs balance start -dusage=5 /mnt/cache' and then progressing run it again and again changing dusage from 5 up to 100 in increments of 5 and then 10 (after 30).

Step 4: Exit the DBRepair script, cleaning up all temp files.

Step 5: Stop the Plex Docker

Step 6: Start the Plex Docker.

As of this morning I found my Plex in a weird.. not accessible state (according to WebUI). I've tried rebuilding the container and accessing the plex instance directly with the localip:32400 but I simply get an unable to connect.

As far as I know overnight there was no changes to my unraid instance and it was working fine just hours before I got to it this morning. I've performed a reboot of unraid underneath it but still nothing. Logs show me this, and the up contents of the container are below as well. any ideas?

```

sh-5.2# ps -ef

UID PID PPID C STIME TTY TIME CMD

root 1 0 0 05:41 ? 00:00:00 /usr/bin/dumb-init -- /bin/bash /usr/local/bin/init.sh

root 31 1 0 05:41 ? 00:00:00 /usr/bin/python /usr/bin/supervisord -c /etc/supervisor.conf -n

nobody 95 31 0 05:41 ? 00:00:00 /usr/bin/dumb-init /bin/bash /home/nobody/start.sh

nobody 96 95 0 05:41 ? 00:00:00 /bin/bash /home/nobody/start.sh

nobody 98 96 35 05:41 ? 00:01:52 /usr/lib/plexmediaserver/Plex Media Server

root 113 0 0 05:46 pts/0 00:00:00 sh

root 123 113 0 05:46 pts/0 00:00:00 ps -ef

sh-5.2#
```

2025-05-29 05:41:32,933 INFO Included extra file "/etc/supervisor/conf.d/plexmediaserver.conf" during parsing
2025-05-29 05:41:32,933 INFO Set uid to user 0 succeeded
2025-05-29 05:41:32,935 INFO supervisord started with pid 31
2025-05-29 05:41:33,937 INFO spawned: 'plexmediaserver' with pid 89
2025-05-29 05:41:33,938 INFO reaped unknown pid 32 (exit status 0)
2025-05-29 05:41:34,002 DEBG 'plexmediaserver' stderr output:
Plex Media Server is already running. Will not start...

2025-05-29 05:41:34,012 DEBG fd 8 closed, stopped monitoring <POutputDispatcher at 23394625943408 for <Subprocess at 23394625943072 with name plexmediaserver in state STARTING> (stdout)>
2025-05-29 05:41:34,013 DEBG fd 10 closed, stopped monitoring <POutputDispatcher at 23394624213136 for <Subprocess at 23394625943072 with name plexmediaserver in state STARTING> (stderr)>
2025-05-29 05:41:34,013 WARN exited: plexmediaserver (exit status 1; not expected)
2025-05-29 05:41:34,013 DEBG received SIGCHLD indicating a child quit
2025-05-29 05:41:35,014 INFO spawned: 'plexmediaserver' with pid 95
2025-05-29 05:41:36,015 INFO success: plexmediaserver entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
1 hour ago, binhex said:
too many start retries too quickly

There is nothing in the log that shows this error trace that I can see. and for all purposes I can see that plexmediaserver is up and running.

About 90 minutes after posting this however, my plex server IS accessible. In the interim i have made no changes to the system and actually had to go to work so I wasn't mucking around.

  • Author
7 minutes ago, octomobiki said:

About 90 minutes after posting this however, my plex server IS accessible. In the interim i have made no changes to the system and actually had to go to work so I wasn't mucking around.

it is possible there was a large change to the database in the latest version which results in no access until this operation is complete, this does happen from time to time.

2 hours ago, binhex said:

it is possible there was a large change to the database in the latest version which results in no access until this operation is complete, this does happen from time to time.

I'm having the same issue, visiting the WebUI gives me this -

<Response code="503" title="Maintenance" status="Plex Media Server is currently running database migrations."/>

Guess I'll just wait, I have backups but not sure if I should restore or not.

  • Author
22 minutes ago, JoshuaH15 said:

Guess I'll just wait, I have backups but not sure if I should restore or not.

if it's busy performing database migration then i would STRONGLY suggest waiting this out, any interruption in this will probably lead to database corruption.

I'm having the same problem as octomobiki

and JoshuaH15


I'll wait and hopefully it resolves on its own.

(update) the issue resolved after 3 or so hours, it must have been database migration. I guess this time it just took longer than usual so I noticed when I went to use Plex. I wonder why I didn't get the <Response code="503" title="Maintenance" status="Plex Media Server is currently running database migrations."/> message when I tried to access the web UI. That is much more helpful than the connection refused error I got.

Edited by Oremonger

7 hours ago, binhex said:

it is possible there was a large change to the database in the latest version which results in no access until this operation is complete, this does happen from time to time.

This is an interesting concept. the period of inability to access the server DID come after a library refresh in the morning. Ok I feel much better about the situation now and have a better idea about when/where to start poking around. thank you so much!.

Any idea as to what would be causing this? only seems to effect plex. I've tried a new NIC and ethernet cable. Doesn't seem to make difference,


May 29, 2025 19:23:37.756 [23366031375160] DEBUG - MyPlex: using cached data for request for https://plex.tv/api/v2/server/users/services?auth_token=xxxxxxxxxxxxxxxxxxxx
May 29, 2025 19:23:38.227 [23366156831544] DEBUG - NetworkInterface: received Netlink message len=1432, type=RTM_NEWLINK, flags=0x0
May 29, 2025 19:23:38.227 [23366156831544] DEBUG - NetworkInterface: Netlink information message family=0, type=1, index=84, flags=0x1002, change=0xffffffff
May 29, 2025 19:23:38.227 [23366156831544] DEBUG - Network change.
May 29, 2025 19:23:38.227 [23366156831544] DEBUG - NetworkInterface: Notified of network changed (force=0)
May 29, 2025 19:23:38.233 [23366156831544] DEBUG - Network change notification but nothing changed.
May 29, 2025 19:23:38.233 [23366156831544] DEBUG - NetworkInterface: received Netlink message len=1432, type=RTM_NEWLINK, flags=0x0
May 29, 2025 19:23:38.233 [23366156831544] DEBUG - NetworkInterface: Netlink information message family=0, type=1, index=85, flags=0x1002, change=0xffffffff
May 29, 2025 19:23:38.233 [23366156831544] DEBUG - Network change.
May 29, 2025 19:23:38.233 [23366156831544] DEBUG - NetworkInterface: Notified of network changed (force=0)
May 29, 2025 19:23:38.235 [23366156831544] DEBUG - Network change notification but nothing changed.
May 29, 2025 19:23:38.235 [23366156831544] DEBUG - NetworkInterface: received Netlink message len=1756, type=RTM_NEWLINK, flags=0x0
May 29, 2025 19:23:38.235 [23366156831544] DEBUG - NetworkInterface: Netlink information message family=0, type=1, index=85, flags=0x1002, change=0x0
May 29, 2025 19:23:38.235 [23366156831544] DEBUG - Network change.
May 29, 2025 19:23:38.235 [23366156831544] DEBUG - NetworkInterface: Notified of network changed (force=0)
May 29, 2025 19:23:38.236 [23366156831544] DEBUG - Network change notification but nothing changed.
May 29, 2025 19:23:38.236 [23366156831544] DEBUG - NetworkInterface: received Netlink message len=1756, type=RTM_NEWLINK, flags=0x0
May 29, 2025 19:23:38.236 [23366156831544] DEBUG - NetworkInterface: Netlink information message family=0, type=1, index=85, flags=0x1002, change=0x100
May 29, 2025 19:23:38.236 [23366156831544] DEBUG - Network change.
May 29, 2025 19:23:38.236 [23366156831544] DEBUG - NetworkInterface: Notified of network changed (force=0)
May 29, 2025 19:23:38.238 [23366156831544] DEBUG - Network change notification but nothing changed.
May 29, 2025 19:23:38.238 [23366156831544] DEBUG - NetworkInterface: received Netlink message len=408, type=RTM_NEWLINK, flags=0x0
May 29, 2025 19:23:38.238 [23366156831544] DEBUG - NetworkInterface: Netlink information message family=7, type=1, index=85, flags=0x1002, change=0x0
May 29, 2025 19:23:38.238 [23366156831544] DEBUG - Network change.
May 29, 2025 19:23:38.238 [23366156831544] DEBUG - NetworkInterface: Notified of network changed (force=0)
May 29, 2025 19:23:38.239 [23366156831544] DEBUG - Network change notification but nothing changed.
May 29, 2025 19:23:38.239 [23366156831544] DEBUG - NetworkInterface: received Netlink message len=1756, type=RTM_NEWLINK, flags=0x0
May 29, 2025 19:23:38.239 [23366156831544] DEBUG - NetworkInterface: Netlink information message family=0, type=1, index=85, flags=0x1003, change=0x1
May 29, 2025 19:23:38.239 [23366156831544] DEBUG - Network change.
May 29, 2025 19:23:38.239 [23366156831544] DEBUG - NetworkInterface: Notified of network changed (force=0)
May 29, 2025 19:23:38.241 [23366156831544] DEBUG - Network change notification but nothing changed.
May 29, 2025 19:23:38.241 [23366156831544] DEBUG - NetworkInterface: received Netlink message len=408, type=RTM_NEWLINK, flags=0x0
May 29, 2025 19:23:38.241 [23366156831544] DEBUG - NetworkInterface: Netlink information message family=7, type=1, index=85, flags=0x1003, change=0x0
May 29, 2025 19:23:38.241 [23366156831544] DEBUG - Network change.
May 29, 2025 19:23:38.241 [23366156831544] DEBUG - NetworkInterface: Notified of network changed (force=0)
May 29, 2025 19:23:38.242 [23366156831544] DEBUG - Network change notification but nothing changed.
May 29, 2025 19:23:38.436 [23366156831544] DEBUG - NetworkInterface: received Netlink message len=648, type=RTM_DELLINK, flags=0x0
May 29, 2025 19:23:38.436 [23366156831544] DEBUG - NetworkInterface: Netlink information message family=0, type=1, index=84, flags=0x1002, change=0xffffffff
May 29, 2025 19:23:38.454 [23366156831544] DEBUG - NetworkInterface: received Netlink message len=408, type=RTM_NEWLINK, flags=0x0
May 29, 2025 19:23:38.454 [23366156831544] DEBUG - NetworkInterface: Netlink information message family=7, type=1, index=85, flags=0x11043, change=0x0
May 29, 2025 19:23:38.454 [23366156831544] DEBUG - Network change.
May 29, 2025 19:23:38.454 [23366156831544] DEBUG - NetworkInterface: Notified of network changed (force=0)
May 29, 2025 19:23:38.456 [23366156831544] DEBUG - Network change notification but nothing changed.
May 29, 2025 19:23:38.456 [23366156831544] DEBUG - NetworkInterface: received Netlink message len=408, type=RTM_NEWLINK, flags=0x0
May 29, 2025 19:23:38.456 [23366156831544] DEBUG - NetworkInterface: Netlink information message family=7, type=1, index=85, flags=0x11043, change=0x0
May 29, 2025 19:23:38.456 [23366156831544] DEBUG - Network change.
May 29, 2025 19:23:38.456 [23366156831544] DEBUG - NetworkInterface: Notified of network changed (force=0)
May 29, 2025 19:23:38.457 [23366156831544] DEBUG - Network change notification but nothing changed.
May 29, 2025 19:23:38.457 [23366156831544] DEBUG - NetworkInterface: received Netlink message len=1764, type=RTM_NEWLINK, flags=0x0
May 29, 2025 19:23:38.457 [23366156831544] DEBUG - NetworkInterface: Netlink information message family=0, type=1, index=85, flags=0x11043, change=0x0
May 29, 2025 19:23:38.457 [23366156831544] DEBUG - Network change.
May 29, 2025 19:23:38.457 [23366156831544] DEBUG - NetworkInterface: Notified of network changed (force=0)
May 29, 2025 19:23:38.458 [23366156831544] DEBUG - Network change notification but nothing changed.
May 29, 2025 19:23:53.585 [23366156831544] DEBUG - NetworkInterface: received Netlink message len=408, type=RTM_NEWLINK, flags=0x0
May 29, 2025 19:23:53.585 [23366156831544] DEBUG - NetworkInterface: Netlink information message family=7, type=1, index=85, flags=0x11043, change=0x0
May 29, 2025 19:23:53.585 [23366156831544] DEBUG - Network change.
May 29, 2025 19:23:53.585 [23366156831544] DEBUG - NetworkInterface: Notified of network changed (force=0)
May 29, 2025 19:23:53.586 [23366156831544] DEBUG - Network change notification but nothing changed.
May 29, 2025 19:24:29.088 [23366464072504] DEBUG - WebSocket: client initiated close
May 29, 2025 19:24:29.088 [23366464072504] DEBUG - NotificationStream: Removing because of close
May 29, 2025 19:24:29.173 [23366466181944] DEBUG - handleStreamRead code 2: End of file

I had a lot of issues with /home/nobody/dbrepair.sh that comes bundled with binhex-plexpass. I think it's extremely confusing to name the script the same as the much more fully featured script found via https://github.com/ChuckPa/DBRepair

I ran into a multitude of issues, including the script finishing in <1 second and not actually doing anything, as well as the script running for 20+ hours and achieving nothing aside from generating a gargantuan WAL file in excess of 50GB.

I see a lot of complaints on reddit and these forums from people trying to run the "proper" DBRepair script from ChuckPa and not being able to stop the PMS service in binhex-plex / binhex-plexpass and going around in circles.

In any case, I want to post what solved my issues after recovering a 250GB backup of my Plex folder after the binhex script failed to yield any results.

  1. Opened console for binhex-plexpass

  2. Ran kill -15 $(pidof) 'Plex Media Server') about 10 times until watchdog gave up trying to start Plex

  3. Downloaded and ran ChuckPa's DBRepair

  4. Ran option 911 (deflate/vacuum), which dropped my database from 73GB to 681MB

  5. Ran an automatic repair

All in all it took about 1.5-2 hours and my database was fully repaired and Plex is running wonderfully again.

It would be great if this script was included, or if the container had some kind of stop command to make using ChuckPa's script a bit easier. A tertiary google search for "binhex dbrepair.sh stop plex" shows a lot of people running around in circles trying to fix their DB's.

And as an aside I think it would be beneficial to rename the script "binhexdbfix.sh" or some such considering ChuckPa's has been around much longer and is named exactly the same.

  • Author
5 hours ago, LumpyCustard said:

. I think it's extremely confusing to name the script the same as the much more fully featured script found via https://github.com/ChuckPa/DBRepair

This was not done on purpose, i was totally unaware of ChuckPA's script at the time my script was created, i shall be renaming my script, as i want to make it a more generic tool for any sqlite database related issues, not just plex.

5 hours ago, LumpyCustard said:

ran into a multitude of issues, including the script finishing in <1 second and not actually doing anything, as well as the script running for 20+ hours and achieving nothing aside from generating a gargantuan WAL file in excess of 50GB.

woud love some more detail on this, a lot of people have great success with the script i wrote.

5 hours ago, LumpyCustard said:

I see a lot of complaints on reddit and these forums from people trying to run the "proper" DBRepair script from ChuckPa and not being able to stop the PMS service in binhex-plex / binhex-plexpass and going around in circles.

TBH it's trivial to stop PMS, you simply find the pid for PMS and kill (sigterm) it, that's it, that is all my script does, ChuckPa im sure could do something very similar.

5 hours ago, LumpyCustard said:

Ran kill -15 $(pidof) 'Plex Media Server') about 10 times until watchdog gave up trying to start Plex

no idea why you had to do that, supervisord (init manager) is not set to restart the process on exit, works for me (just tested on fresh plexpass container).

EDIT - Turns our ChuckPa renamed his tool from PlexDBRepair to DBRepair, so maybe he should rename his script ;-) https://github.com/ChuckPa/DBRepair/releases/tag/v1.11.00

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.