# Corrupt database, but pms is running

**URL:** <https://forums.plex.tv/t/corrupt-database-but-pms-is-running/736054>\
**Category:** Plex Media Server\
**Tags:** server-windows\
**Created:** [August 13, 2021, 7:06am UTC](https://forums.plex.tv/t/corrupt-database-but-pms-is-running/736054 "2021-08-13T07:06:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThaigerPlex](https://avatars.discourse-cdn.com/v4/letter/t/9fc29f/32.png) [@ThaigerPlex](https://forums.plex.tv/u/ThaigerPlex)\
**Post date:** [August 13, 2021, 7:06am UTC](https://forums.plex.tv/t/corrupt-database-but-pms-is-running/736054/1 "2021-08-13T07:06:40Z")

</div>

Hi Sir/Mam,

I am deeply sorry if i post this wrong, but please help, it would mean all to me, and i will be super happy.

This morning my mobile with Plex dashboard had a message “could not backup database”, “database corrupt”. But my plex is running without any visual errors.  
I then went to 3. last menu, and pressed, clean database, and optimize database.  
Then tried to save the database, but the zip file that saves is empty, i can only save the attached log file.

I my self am not new to plex, but as i am not a linux code man i dont know what more to do. I am grafic user, not code guy. I help many other users here in Demark on the danish fb community plex group, but this one i cant figure out.

My plex runs on a Windows 10 machine, and there are space on the drive.  
i run plex version 1.24.0.4930[Plex Media Server Logs\_2021-08-13\_08-18-52.zip](https://forums.plex.tv/uploads/short-url/24vDuU2wuzpbl3oHtNHs9OMQCfp.zip) (1.7 MB)

Kind regards  
Mr. ThaigerPlex

---

<div class="post-metadata">

**Author:** ![FordGuy61](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@FordGuy61](https://forums.plex.tv/u/FordGuy61)\
**Post date:** [August 13, 2021, 7:32am UTC](https://forums.plex.tv/t/corrupt-database-but-pms-is-running/736054/2 "2021-08-13T07:32:53Z")

</div>

Your log files show database corruption:  
`Aug 12, 2021 19:17:08.026 [16368] ERROR - SQLITE3:0xbf6285b2, 11, database corruption at line 81887 of [1b256d97b5]`

You have three choices: a) repair; b) restore from backup; c) delete and start over.

The database is located in `%LOCALAPPDATA%\Plex Media Server\Plug-in Support\Databases`. The default location for `%LOCALAPPDATA%` is c:\Users\user\_name\AppData which Windows hides by default. To see the folder in Windows File Manager, select the View tab, then check the box next to Hidden Items. Reference: [Where is the Plex Database Located](https://support.plex.tv/articles/202915258-where-is-the-plex-media-server-data-directory-located/).

[Repair a Corrupted Database](https://support.plex.tv/articles/repair-a-corrupted-database/) details how to repair a database.

If Plex Media Server is backing up the database (part of scheduled tasks), you can try restoring from one of the backups. After restoring, scan your libraries to pick up any media added since the backup occurred. [Restore a Database Backed Up via ‘Scheduled Tasks’](https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/) has additional information.

If repair and restoral do not work, you can delete the database and start over. You will have to re-create your libraries, reshare them with any friends, etc. Your media files remain intact during the process (this deletes only the database, not your media).

From [Repair a Corrupted Database](https://support.plex.tv/articles/repair-a-corrupted-database/):  
**Note** : You can also simply delete the `com.plexapp.plugins.library.db` database file while the Plex Media Server is not running. Restarting the server will then restore your server to a nearly-fresh install state. (i.e. You will _lose your existing libraries and need to recreate them_ , but you won’t be affecting your content itself.)

---

<div class="post-metadata">

**Author:** ![FordGuy61](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@FordGuy61](https://forums.plex.tv/u/FordGuy61)\
**Post date:** [August 13, 2021, 7:37am UTC](https://forums.plex.tv/t/corrupt-database-but-pms-is-running/736054/3 "2021-08-13T07:37:13Z")

</div>

Two unrelated items to address: Nvidia Driver versions and Logging Levels.

**Nvidia Drivers**  
You need to update your Nvidia drivers. Hardware accelerated transcoding will not work correctly with out of date drivers.  
`Aug 13, 2021 03:16:41.956 [4384] ERROR - [FFMPEG] - The minimum required Nvidia driver for nvenc is 418.81 or newer`

**Logging Level**  
Enable DEBUG level logging in Plex Media Server. It provides the necessary level of information (it is not currently enabled).

Do not enable verbose logging, which causes the log files to wrap too quickly.

 ![logs](https://global.discourse-cdn.com/plex/original/3X/3/5/3582f414b9102c8faa7bed51c6e684114da2ec67.jpeg)

> **[Reporting issues with Plex Media Server | Plex Support](https://support.plex.tv/articles/201643703-reporting-issues-with-plex-media-server/)**
>
> How to Report an Issue If you believe you have found an issue in Plex Media Server, please report it...

---

<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:** [August 13, 2021, 7:44am UTC](https://forums.plex.tv/t/corrupt-database-but-pms-is-running/736054/4 "2021-08-13T07:44:35Z")

</div>

How much free space is on your C: drive?  
If it’s nearly full, this might be the very reason for the database corruption.  
While you have installed the plex server on drive D: (which is not recommended by the way), this will only move ~170MB off of C:  
Your [plex data folder](https://support.plex.tv/articles/202915258-where-is-the-plex-media-server-data-directory-located/) and the main database file are still residing on drive C:, and this folder can get _much_ bigger than 170 MB.

So before you are trying to repair the database, move your [plex data folder](https://support.plex.tv/articles/202915258-where-is-the-plex-media-server-data-directory-located/) to someplace else.  
Otherwise your freshly repaired (or recreated) database might get damaged again shortly: [[HowTo] An extended guide on how to move the Plex data folder on Windows](https://forums.plex.tv/t/howto-an-extended-guide-on-how-to-move-the-plex-data-folder-on-windows/197060/1)

---

<div class="post-metadata">

**Author:** ![ThaigerPlex](https://avatars.discourse-cdn.com/v4/letter/t/9fc29f/32.png) [@ThaigerPlex](https://forums.plex.tv/u/ThaigerPlex)\
**Post date:** [August 18, 2021, 1:55pm UTC](https://forums.plex.tv/t/corrupt-database-but-pms-is-running/736054/5 "2021-08-18T13:55:11Z")

</div>

Hi,

Super thanks to you both, werry werry appriciated 😉  
It seems that the problem is solved by restoring a backup.  
Super thanks for your kind and fast help 😉

Would be nice with a “advanced user” butten, “restore backup” in pms directly 🙂  
with warning of the potential consequences…

Chears  
ThaigerPlex

---

<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:** [August 19, 2021, 7:09am UTC](https://forums.plex.tv/t/corrupt-database-but-pms-is-running/736054/6 "2021-08-19T07:09:27Z")

</div>

Just to be on the safe side, repair the restored database file as well.

---

<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:** [November 17, 2021, 7:09am UTC](https://forums.plex.tv/t/corrupt-database-but-pms-is-running/736054/7 "2021-11-17T07:09:47Z")

</div>

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