***RESOLVED*** Plex Media Server - Unreachable once optimized Database starts (Unraid 6.8)

Server Version#: 1.19.4.2935-79e214ead-ls107
Player Version#: Newest version PMP and Plex for Windows

I run an unraid 6.8.3 server, in which I use Linuxserver’s release of Plex Media Server. Until about a month(ish) ago, I could manually run my optimize database and it’d complete within 30 seconds at the longest.

Now I start it at like 1 am, and when I wake up 8 hours later, it’s still running (I guess), with plex completely unreachable.

Plex Media Server.log (6.0 MB)

I’ve provided what I’m hoping is the correct log. Any advice as to what’s happening or how I can resolve it? Right now, the only solution is to restart Plex Media Server to regain access.

Ok… I think I resolved the issue.

Firstly, anyone reading this, I can’t recommend enough making sure you have scheduled backup’s of things such as your database. I learned that lesson a couple of years ago. Thank god I still practice it today.

I ended up pulling the com.plexapp.plugins.library.db from my server, onto my desktop.

I then used SQLite to verify the integrity of my db. Sure enough, it popped out a bunch of errors talking about how the database was malformed.

So I ran the commands (https://support.plex.tv/articles/201100678-repair-a-corrupt-database/) to repair it. 3 minutes later, I’m all done with a “new” .db file.

I go back to my plex server. I backup my messed up DB, because… back ups. Better to have it and not need it than not have it.

I then deleted the .com.plexapp.plugins.library.db-wal and -shm files. Once done, I imported my rebuilt db to it’s original folder, and started the server up.

If anyone is having this issue, I can’t stress enough, if you don’t delete the wal and shm file, you’ll see in your unraid logs “Starting Plex Media Server” repeating… forever.

Got my server up and running on a database that’s about 2 weeks ago. Ran an optimize database. Took a little longer than usually (about 2minutes), but I watched it rebuild the wal and shm files (shm is only like 1.5mb, while my wal file is the same size as my db (240mb).

We’re back online, I can run my optimization. I’ve went a head and backed everything up again as of today.

We’re good to go.

If any users have this issues, feel free to reply to this thread with questions on what exactly I did in better detail and I will help.

tl;dr - Couldn’t optimize my database. Database ended up being badly corrupt. Used SQLite 3 to repair/rebuild. We’re g2g.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.