# Continual database crashes

**URL:** <https://forums.plex.tv/t/continual-database-crashes/767065>\
**Category:** Plex Media Server\
**Tags:** server-windows\
**Created:** [December 29, 2021, 4:52am UTC](https://forums.plex.tv/t/continual-database-crashes/767065 "2021-12-29T04:52:35Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![NavyRules](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/navyrules/32/206257_2.png) [@NavyRules](https://forums.plex.tv/u/NavyRules)\
**Post date:** [December 29, 2021, 4:52am UTC](https://forums.plex.tv/t/continual-database-crashes/767065/1 "2021-12-29T04:52:35Z")

</div>

I am on windows 10.

Have the latest version of the media server. I know this because I just did a fresh download and install.

I’m getting continual errors saying the media server can not access the database because it is corrupt.

I’ve tried a repair using the install file. When that failed, I tried a full uninstall and reinstall. Still getting the same error.

Please, can someone help. We use Plex for at least a dozen hours each day so having this down is a big problem for us.

---

<div class="post-metadata">

**Author:** ![kegbeach](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/kegbeach/32/216116_2.png) [@kegbeach](https://forums.plex.tv/u/kegbeach)\
**Post date:** [December 29, 2021, 5:15am UTC](https://forums.plex.tv/t/continual-database-crashes/767065/2 "2021-12-29T05:15:38Z")

</div>

Re-installing Plex will not touch the database files so this would be why it’s still happening. If the repair didn’t work then what I would do is delete everything from the data directory and start over. Unless a Plex employee can chime in here otherwise…

Really sucks to do that though.

---

<div class="post-metadata">

**Author:** ![NavyRules](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/navyrules/32/206257_2.png) [@NavyRules](https://forums.plex.tv/u/NavyRules)\
**Post date:** [December 29, 2021, 5:22am UTC](https://forums.plex.tv/t/continual-database-crashes/767065/3 "2021-12-29T05:22:54Z")

</div>

If I could find the darn directory I would happily do that to get this fixed. But everything I search for shows it as deleted.

I haven’t changed any of the default directory settings so it should be where it wants it to be, but I’ll be damned if I can find it.

---

<div class="post-metadata">

**Author:** ![kegbeach](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/kegbeach/32/216116_2.png) [@kegbeach](https://forums.plex.tv/u/kegbeach)\
**Post date:** [December 29, 2021, 5:28am UTC](https://forums.plex.tv/t/continual-database-crashes/767065/4 "2021-12-29T05:28:39Z")

</div>

I don’t use Windows but according to the support articles it is:

## Windows

On Windows, the content is located inside of the user directory.

```auto
%LOCALAPPDATA%\Plex Media Server

```

Basically the same place you did the database repair assuming you did it correctly… there is a manual way to repair but it could be difficult for some people.

[https://support.plex.tv/articles/repair-a-corrupted-database/](https://support.plex.tv/articles/repair-a-corrupted-database/)

---

<div class="post-metadata">

**Author:** ![NavyRules](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/navyrules/32/206257_2.png) [@NavyRules](https://forums.plex.tv/u/NavyRules)\
**Post date:** [December 29, 2021, 5:34am UTC](https://forums.plex.tv/t/continual-database-crashes/767065/5 "2021-12-29T05:34:00Z")

</div>

Yep, I saw that article, but it isn’t working. I have no such directory as “plug-in support”. Even after a fresh install, such a directory and necessary files don’t seem be created.

I’m at a total loss here. It seems to be installing everything into the program files (x86) directory and there is no other plex directory, hidden or otherwise, that I can find anywhere on the drive.

---

<div class="post-metadata">

**Author:** ![kegbeach](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/kegbeach/32/216116_2.png) [@kegbeach](https://forums.plex.tv/u/kegbeach)\
**Post date:** [December 29, 2021, 5:40am UTC](https://forums.plex.tv/t/continual-database-crashes/767065/6 "2021-12-29T05:40:15Z")

</div>

It’s not in Program Files. Try “This PC - Local Disk C: - Users - Your username”

You might have to show hidden files once there but I’m not completely sure as I don’t use Windows.

---

<div class="post-metadata">

**Author:** ![NavyRules](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/navyrules/32/206257_2.png) [@NavyRules](https://forums.plex.tv/u/NavyRules)\
**Post date:** [December 29, 2021, 6:03am UTC](https://forums.plex.tv/t/continual-database-crashes/767065/7 "2021-12-29T06:03:00Z")

</div>

Well, that let me find the database files, thank you. However, even after completely deleting them, I am still getting the same error that “Plex Media Server was unable to open it’s media database” with the title of this error window being a corrupt database. I can see the media server re-creating the file when I start the server. Yet it is saying it’s own file it just created is corrupt.

WTF?

I want to scream.

---

<div class="post-metadata">

**Author:** ![NavyRules](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/navyrules/32/206257_2.png) [@NavyRules](https://forums.plex.tv/u/NavyRules)\
**Post date:** [December 29, 2021, 6:18am UTC](https://forums.plex.tv/t/continual-database-crashes/767065/8 "2021-12-29T06:18:07Z")

</div>

Asking (please read that as “begging”) a plex employee to chime in.

Anyone that can help, either by talking me through things or even if I allow remote access, I would greatly appreciate it. Just a disabled old guy here that has come to depend on plex for his daily entertainment.

Getting late here and I need to go to bed. Will hope for good news in the morning.

---

<div class="post-metadata">

**Author:** ![OttoKerner](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ottokerner/32/10079_2.png) [@OttoKerner](https://forums.plex.tv/u/OttoKerner)\
**Post date:** [December 29, 2021, 7:54am UTC](https://forums.plex.tv/t/continual-database-crashes/767065/9 "2021-12-29T07:54:07Z")

</div>

Try the thorough way: [Uninstall Plex Media Server | Plex Support](https://support.plex.tv/articles/201941078-uninstall-plex-media-server/)

---

<div class="post-metadata">

**Author:** ![NavyRules](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/navyrules/32/206257_2.png) [@NavyRules](https://forums.plex.tv/u/NavyRules)\
**Post date:** [December 29, 2021, 4:31pm UTC](https://forums.plex.tv/t/continual-database-crashes/767065/10 "2021-12-29T16:31:22Z")

</div>

That way seemed to have worked. The local app data directory was over 8 gig in size and too many files for me to remember. Not sure if that is a normal size for this or if perhaps this lead to my crash.

New install went fine. It’s loading all my libraries now. This will take some time I imagine.

This leads to a couple questions for the experts here…

1. Was the size of my app data a problem?
2. Is there a way to back-up my database so I don’t lose everything again and be able to restore it easily? Perhaps backups on a schedule saved to a different drive?
3. Are there steps I can take to purge, compress or otherwise do maintenance on my database or data directories to help prevent problems?

Remembering I’m a lay-person here, any help would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![OttoKerner](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ottokerner/32/10079_2.png) [@OttoKerner](https://forums.plex.tv/u/OttoKerner)\
**Post date:** [December 29, 2021, 11:09pm UTC](https://forums.plex.tv/t/continual-database-crashes/767065/11 "2021-12-29T23:09:58Z")

</div>

1. No. Mine is way larger. But you must make sure that you never run out of free space on that drive. So keep an eye on it.
2. Only manually save that very folder. There is a Powershell script to aid in this: [PSA: Script to back up and restore Plex app data on a Windows system](https://forums.plex.tv/t/psa-script-to-back-up-and-restore-plex-app-data-on-a-windows-system/368779/1)
3. Leave your server running over night. It will perform the maintenance on its own. [Scheduled Tasks | Plex Support](https://support.plex.tv/articles/201553286-scheduled-tasks/)

---

<div class="post-metadata">

**Author:** ![NavyRules](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/navyrules/32/206257_2.png) [@NavyRules](https://forums.plex.tv/u/NavyRules)\
**Post date:** [December 29, 2021, 11:32pm UTC](https://forums.plex.tv/t/continual-database-crashes/767065/12 "2021-12-29T23:32:07Z")

</div>

Thanks for the hints.

I already leave my machine on. In fact I rarely turn it off. My plex server is running on my old PC (got a new one last year) whose sole purpose is to run Plex. All my media is stored on an external 8tb hard drive that is mirrored to a duplicate in case of hard drive failure. The only time this machine is turned off or rebooted is when Windows needs a restart for updates.  
I guess this means it is doing its own maintenance every night. As for the “powershell” thing, that’s greek to me. I’ll check that link you provided and see what I can learn. If it is simply a matter of duplicating the folder, I can create a batch file (yes…I’m so old I still use DOS) to copy that over to a separate drive.

Kid you not, being a disabled old guy, my TV and computer are my links to the outside world. I don’t know what I’d do without Plex.

---

<div class="post-metadata">

**Author:** ![OttoKerner](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ottokerner/32/10079_2.png) [@OttoKerner](https://forums.plex.tv/u/OttoKerner)\
**Post date:** [December 29, 2021, 11:34pm UTC](https://forums.plex.tv/t/continual-database-crashes/767065/13 "2021-12-29T23:34:09Z")

</div>

> [@NavyRules](#):
>
> I can create a batch file

If you can run a batch file, you can run a powershell script as well.  
It is just a newer version of a batch file, really.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [March 29, 2022, 11:35pm UTC](https://forums.plex.tv/t/continual-database-crashes/767065/14 "2022-03-29T23:35:07Z")

</div>

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