Response code="503" title="Maintenance" status="Plex Media Server is currently running database migr

Server Version#: 1.29.2.6364-7000
Player Version#: 1.79.1.3984-879339ed
<If providing server logs please do NOT turn on verbose logging, only debug logging should be enabled>
I can’t access Plex anymore, so I uninstalled and reinstalled, and now I am getting an error Response code=“503” title=“Maintenance” status=“Plex Media Server is currently running database migration.”/, I am not a technical person, so I know what this means, how do I fix it? thank you for your help.

@dn8qm

Did you completely delete the PlexMediaServer shared folder or did you just uninstall what you were using and reinstall 1.29.2 from Package Center?
Which version were you using ?

Status (not error) 503 is, as the message states, PMS is busy restructuring the DB.

For some folks, that can take a few hours (depends how much media you have indexed into PMS)

What can you tell me about what you have there ?

I uninstalled the app, but did not delete the plexmediaserver shared folder, should I?
Size wise, my library is 1.42 TB,

If your PlexMediaServer shared folder is 1.42TB then that’s significant.
I suspect you have a fair amount of indexed media.

I am concerned about flip-flopping versions. The reason is that the DB can be corrupted (will be fixed in 1.40.4 release) if you interrupt it before the maintenance work completes.

Can you please show me (screenshot of FileStation) for

PlexMediaServer/AppData/Plex Media Server/Plug-in Support/Databases ?


Here is the screenshot.

Thank you.

Your DB is HUGE!!! 22.72 GB

May I ask how many media items you have (photos, songs, episodes, movies) approximately ?

If you look, the `DB-WAL file being 18.82 GB is very dangerous and a bad sign.
It’s telling me PMS never really had a nice clean shutdown (The WAL files hold all the pending changes to the databases and are folded in as PMS shuts down normally)

Compare against what I have which includes about 500,000 dummy test files

[chuck@glockner Databases.2002]$ ll -h
total 2.8G
drwxr-xr-x 2 plex plex 4.0K May 22 14:59 ./
drwxr-xr-x 7 plex plex  120 May  6  2023 ../
-rw-rw-r-- 1 plex plex 1.1M May 19 16:26 com.plexapp.plugins.library.blobs.db
-rw-r--r-- 1 plex plex 1.1M May 11 02:04 com.plexapp.plugins.library.blobs.db-2024-05-11
-rw-r--r-- 1 plex plex 1.1M May 14 02:01 com.plexapp.plugins.library.blobs.db-2024-05-14
-rw-r--r-- 1 plex plex 1.1M May 17 02:01 com.plexapp.plugins.library.blobs.db-2024-05-17
-rw-r--r-- 1 plex plex 1.1M May 20 02:04 com.plexapp.plugins.library.blobs.db-2024-05-20
-rw-rw-r-- 1 plex plex  32K May 22 14:59 com.plexapp.plugins.library.blobs.db-shm
-rw-rw-r-- 1 plex plex    0 May 22 14:59 com.plexapp.plugins.library.blobs.db-wal
-rw-rw-r-- 1 plex plex 572M May 22 16:27 com.plexapp.plugins.library.db
-rw-r--r-- 1 plex plex 558M May 11 02:04 com.plexapp.plugins.library.db-2024-05-11
-rw-r--r-- 1 plex plex 561M May 14 02:01 com.plexapp.plugins.library.db-2024-05-14
-rw-r--r-- 1 plex plex 557M May 17 02:01 com.plexapp.plugins.library.db-2024-05-17
-rw-r--r-- 1 plex plex 572M May 20 02:04 com.plexapp.plugins.library.db-2024-05-20
-rw-rw-r-- 1 plex plex  32K May 22 17:41 com.plexapp.plugins.library.db-shm
-rw-rw-r-- 1 plex plex 4.0M May 22 17:41 com.plexapp.plugins.library.db-wal
-rwxr-xr-x 1 root root  62K Jan 14 18:48 dbrdev.sh*
-rw-r--r-- 1 root root  21K Apr  4 00:32 DBRepair.log

it’s 84GB audiobooks, 611GB movies 315 GB music, 480 GB shows 17 GB wqorkout videos, Now its also stoping on its own, so Its not even indexing I think, I am happy to delet the database and rebuild dont mind if it take a few days, as long as it works int he end, is there a way to do this?

There are a couple options but they are dependent on how comfortable you are using the Synology command line (with instructions) via Putty / ssh.

How do you feel about that?

Have you ever heard of or used DBRepair.sh ?

Im on a mac so I have used terminal before, as long as im coipy pasting comands Im good, I’ve never used DBRepair.sh

Go look here please.

This is my DBRepair tool.

Look at the README.md file.

As you scroll down, you’ll see how it’s used from the command line.

With some guidance, please let me know if you think you can manage that .

Sounds good, I’ll try it and let you know if I run into any issues, thank you so much!

What you’ll want to do is very straight forward.

Read through this and, in conjunction with the DBRepair menus/documentation, if it makes sense to you.

  1. Stop Plex
  2. Make a new temporary shared folder “Databases” on Volume 1.
  3. Put “DBRepair.sh” in that new Databases shared folder. (make it easy for us to access from the SSH command line.)
  4. Open Control Panel - Terminal & SNMP
  5. Enable SSH protocol
  6. From your Mac, open a terminal session window.
  7. In that terminal window, ssh IP.addr.of.syno
    – It will want your username to log in.
    – It will want your password ( NOTHING WILL ECHO – type carefully ).
    (Looks like this)
chuck@ds418's password: 

Using terminal commands to modify system configs, execute external binary
files, add files, or install unauthorized third-party apps may lead to system
damages or unexpected behavior, or cause data loss. Make sure you are aware of
the consequences of each command and proceed at your own risk.

Warning: Data should only be stored in shared folders. Data stored elsewhere
may be deleted when the system is updated/restarted.

chuck@ds418:~$ 
  1. You will now “cd” to /volume1/Databases (where you uploaded DBRepair.sh)

  2. sudo bash
    (This gives us admin privilege at the command line)

  3. ./DBRepair.sh

  4. It should respond with the menu prompt --AND-- confirm “DSM 7”

chuck@ds418:~$ sudo bash
bash-4.4# ./DBRepair.sh 
 
 
 
      Plex Media Server Database Repair Utility (Synology (DSM 7))
                       Version v1.06.02
 

Select

  1 - 'stop'      - Stop PMS.
  2 - 'automatic' - Check, Repair/Optimize, and Reindex Database in one step.
  3 - 'check'     - Perform integrity check of database.
  4 - 'vacuum'    - Remove empty space from database without optimizing.
  5 - 'repair'    - Repair/Optimize databases.
  6 - 'reindex'   - Rebuild database database indexes.
  7 - 'start'     - Start PMS

  8 - 'import'    - Import watch history from another database independent of Plex. (risky).
  9 - 'replace'   - Replace current databases with newest usable backup copy (interactive).
 10 - 'show'      - Show logfile.
 11 - 'status'    - Report status of PMS (run-state and databases).
 12 - 'undo'      - Undo last successful command.

 42 - 'ignore'    - Ignore duplicate/constraint errors.

 88 - 'update'    - Check for updates.
 99 - 'quit'      - Quit immediately.  Keep all temporary files.
      'exit'      - Exit with cleanup options.

Enter command # -or- command name (4 char min) : 
  1. Run the ‘auto’ command to start a major cleanup of your databases.
    – It may take a long time but will not get stuck / hang.
    – It if there are major database errors, it will report them (Shouldn’t be)

  2. After it does the “Check, Export, Import, Reindex”, we’ll be done with the first step.

  3. Go back to filestation , Look at the file sizes in the “Databases” folder under Plex
    – com.plexapp.plugins.library.db should be the same or smaller size.
    – com.plexapp.plugins.library.blobs.db should be the same or slightly larger.
    – the WAL files will be gone.

  4. Let’s stop here and let me see what it all looks like. (it should be cleaner)

Hi Chuck, what password do I need to type, the computer, the nas, the plex one? I’m a bit lost on that step, I think everything else looks good.

Use the username and password you log into the NAS with.

yep, I got it, I was not adding my sued name before the Ip, since i dont do this offten I forget
thank you!

When convenient, let me know if you need help & how you’re making out please

Hi Chuck, I’ve had the proceces crash twice, here are the messages.
Checking the PMS databases
Terminated
Checking the PMS databases
client_loop: send disconnect: Broken pipe

is there anythign I can do to fix this? I am running the automatic process again, to see if it works. Thank you for your help.

what am I looking at here ?

it’s the messages I got on the terminal window after the process stop. I am running it again, but don’t know if it will work

Is that from my DBRepair ?

If so, Stop Plex… Wait a bit longer.

For some reason (I need to figure out), the new PMS versions take longer to shutdown.