# Plex Media Server constantly backing up database

**URL:** <https://forums.plex.tv/t/plex-media-server-constantly-backing-up-database/843696>\
**Category:** Plex Media Server\
**Tags:** server-synology\
**Created:** [June 7, 2023, 1:39am UTC](https://forums.plex.tv/t/plex-media-server-constantly-backing-up-database/843696 "2023-06-07T01:39:27Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![cleverdevil](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/cleverdevil/32/5001_2.png) [@cleverdevil](https://forums.plex.tv/u/cleverdevil)\
**Post date:** [June 7, 2023, 1:39am UTC](https://forums.plex.tv/t/plex-media-server-constantly-backing-up-database/843696/1 "2023-06-07T01:39:27Z")

</div>

Server Version#: 1.32.4.7164

I am having an issue that has me totally stumped. I have Plex Media Server running on my Synology NAS from the official packages, and all of the sudden Plex insists on backing up the database every 15-20 seconds or so. I see it happening in the “Activity” area in Plex Web. I’ve tried:

- Disabling scheduled backups
- Changing the database backup path
- Completely removing the database and re-adding all of my media (losing all of my metadata in the process, which I do have backed up, thankfully)

Is there something that would cause Plex Media Server to repeatedly attempt to backup?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [June 7, 2023, 1:52am UTC](https://forums.plex.tv/t/plex-media-server-constantly-backing-up-database/843696/2 "2023-06-07T01:52:00Z")

</div>

Please download the [server logs](https://support.plex.tv/articles/200250417-plex-media-server-log-files/) ZIP file and attach it.

The activity will also be recorded in those logs.

There’s something else going woefully wrong.

---

<div class="post-metadata">

**Author:** ![cleverdevil](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/cleverdevil/32/5001_2.png) [@cleverdevil](https://forums.plex.tv/u/cleverdevil)\
**Post date:** [June 7, 2023, 1:54am UTC](https://forums.plex.tv/t/plex-media-server-constantly-backing-up-database/843696/3 "2023-06-07T01:54:08Z")

</div>

Oh thanks for the reminder, I thought I attached the logs, but I forgot. I’ve downloaded a fresh copy now and attached here.  
[Plex Media Server Logs\_2023-06-06\_18-53-43.zip](https://forums.plex.tv/uploads/short-url/6VK5t6LO5rUYWQoYhOyJKHPTtam.zip) (590.1 KB)

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [June 7, 2023, 1:57am UTC](https://forums.plex.tv/t/plex-media-server-constantly-backing-up-database/843696/4 "2023-06-07T01:57:43Z")

</div>

Enable [DEBUG logging](https://support.plex.tv/articles/201643703-reporting-issues-with-plex-media-server/#toc-1) please.

You turned it off at some point.

All I see are INFO, WARN, and the occasional ERROR statement; none of which are useful.

This, however, does not bode well.  
Looks like DB corruption but need more to be definitive.

```auto
Jun 06, 2023 18:45:31.443 [140271110527800] ERROR - [Grabber] SQLITE3:0x80000001, 2067, abort at 46 in [update media_provider_resources set parent_id=:media_provider_resources_parent_id,type=:media_provider_resources_type,status=:media_provider_resources_status,state=:media_provider_resources_state,identifier=:media_provider_resources_identifier,protocol=:media_provider_resources_protocol,uri=:media_provider_resources_uri,uuid=:media_provider_resources_uuid,extra_data=:media_provider_resources_extra_data,last_seen_at=:media_provider_resources_last_seen_at,created_at=:media_provider_resources_created_at,updated_at=:media_provider_resources_updated_at where id=:media_provider_resources_id]: UNIQUE constraint failed: media_provider_resources.uuid
Jun 06, 2023 18:45:31.443 [140271110527800] ERROR - [Grabber] Exception inside transaction (inside=1) (/data/jenkins/server/3530756315/MediaProviders/Grabbers/MediaGrabber.cpp:171): sqlite3_statement_backend::loadOne: UNIQUE constraint failed: media_provider_resources.uuid
Jun 06, 2023 18:45:31.457 [140271110527800] ERROR - [Grabber] SQLITE3:0x80000001, 2067, abort at 46 in [update media_provider_resources set parent_id=:media_provider_resources_parent_id,type=:media_provider_resources_type,status=:media_provider_resources_status,state=:media_provider_resources_state,identifier=:media_provider_resources_identifier,protocol=:media_provider_resources_protocol,uri=:media_provider_resources_uri,uuid=:media_provider_resources_uuid,extra_data=:media_provider_resources_extra_data,last_seen_at=:media_provider_resources_last_seen_at,created_at=:media_provider_resources_created_at,updated_at=:media_provider_resources_updated_at where id=:media_provider_resources_id]: UNIQUE constraint failed: media_provider_resources.uuid
Jun 06, 2023 18:45:31.457 [140271110527800] ERROR - [Grabber] Exception inside transaction (inside=1) (/data/jenkins/server/3530756315/MediaProviders/Grabbers/MediaGrabber.cpp:171): sqlite3_statement_backend::loadOne: UNIQUE constraint failed: media_provider_resources.uuid
Jun 06, 2023 18:45:34.413 [140271082412856] WARN - [Req#6f] QueryParser: Invalid field 'contentDirectoryID' found, ignoring.
Jun 06, 2023 18:45:34.413 [140271082412856] WARN - [Req#6f] QueryParser: Invalid field 'pinnedContentDirectoryID' found, ignoring.
Jun 06, 2023 18:45:34.537 [140271215897232] WARN - [DatabaseFixups] Held transaction for too long (/data/jenkins/server/3530756315/Library/DatabaseFixups.cpp:357): 0.260000 seconds
Jun 06, 2023 18:45:34.559 [140271070038840] ERROR - downloadContainer: expected MediaContainer element, found html
Jun 06, 2023 18:45:34.559 [140271070038840] WARN - Subscription: No container available for /tv.plex.providers.epg.xmltv:16/metadata/tv%2Eplex%2Exmltv%3A%2F%2Fepisode%2FBig%2520Brother%2F24%2F20
Jun 06, 2023 18:45:34.559 [140271070038840] ERROR - Subscription: Error refreshing sub: No container found
Jun 06, 2023 18:45:34.609 [140271140059960] WARN - [Req#73] SLOW QUERY: It took 240.000000 ms to retrieve 13 items.
Jun 06, 2023 18:45:34.616 [140271067929400] ERROR - downloadContainer: expected MediaContainer element, found html
Jun 06, 2023 18:45:34.616 [140271067929400] WARN - Subscription: No container available for /tv.plex.providers.epg.xml

```

---

<div class="post-metadata">

**Author:** ![cleverdevil](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/cleverdevil/32/5001_2.png) [@cleverdevil](https://forums.plex.tv/u/cleverdevil)\
**Post date:** [June 7, 2023, 2:16am UTC](https://forums.plex.tv/t/plex-media-server-constantly-backing-up-database/843696/5 "2023-06-07T02:16:05Z")

</div>

Got it. I just turned it on and downloaded new logs after a few times seeing the attempt to backup the database.

[Plex Media Server Logs\_2023-06-06\_19-14-57.zip](https://forums.plex.tv/uploads/short-url/4MoLHv4i4SHnOgn512hrL1IV55m.zip) (629.8 KB)

---

<div class="post-metadata">

**Author:** ![cleverdevil](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/cleverdevil/32/5001_2.png) [@cleverdevil](https://forums.plex.tv/u/cleverdevil)\
**Post date:** [June 7, 2023, 2:50am UTC](https://forums.plex.tv/t/plex-media-server-constantly-backing-up-database/843696/6 "2023-06-07T02:50:08Z")

</div>

Just an update – I rebooted the NAS, which doesn’t seem to have helped. I had noticed some strange network-related issues in the logs, which prompted me to attempt the reboot. I also noticed some SQL unique constraint violations related to my DVR, which I don’t really use, so I deleted that and restarted Plex Media Server, and it also didn’t fix the issue.

(Thanks a lot for troubleshooting with me, btw).

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [June 7, 2023, 3:49am UTC](https://forums.plex.tv/t/plex-media-server-constantly-backing-up-database/843696/7 "2023-06-07T03:49:35Z")

</div>

> [@cleverdevil](#):
>
> I also noticed some SQL unique constraint violations related to my DVR

There is corruption in there.

How long has it been this way? (PMS keeps backups which you can use if it’s not been too long)

Also, you should turn off your IPv6 in Settings - Server - Network.

Your LAN is IPv4. It’s causing some network screwiness with the cert & auth.

> [::ffff:192.168.7.20]:55924 came in with unrecognized plex.direct SNI name '172-21-0-1.  
> Jun 06, 2023 18:45:36.464 [140271167236920] WARN - [HttpClient/HCl#2c] HTTP error requesting GET [https://172-21-0-1.7bff3dc0cc334f4b99ecf2203012e96e.plex.direct:32400](https://172-21-0-1.7bff3dc0cc334f4b99ecf2203012e96e.plex.direct:32400) (60, SSL peer certificate or SSH remote key was not OK) (SSL: no alternative certificate subject name matches target host name ‘172-21-0-1.7bff3dc0cc334f4b99ecf2203012e96e.plex.direct’)  
> Jun 06, 2023 18:45:36.476 [140271167236920] WARN - [HttpClient/HCl#2d] HTTP error requesting GET [https://172-18-0-1.7bff3dc0cc334f4b99ecf2203012e96e.plex.direct:32400](https://172-18-0-1.7bff3dc0cc334f4b99ecf2203012e96e.plex.direct:32400) (60, SSL peer certificate or SSH remote key was not OK) (SSL: no alternative certificate subject name matches target host name ‘172-18-0-1.7bff3dc0cc334f4b99ecf2203012e96e.plex.direct’)  
> Jun 06, 2023 18:45:36.476 [140271167236920] WARN - [HttpClient/HCl#2e] HTTP error requesting GET [https://172-23-0-1.7bff3dc0cc334f4b99ecf2203012e96e.plex.direct:32400](https://172-23-0-1.7bff3dc0cc334f4b99ecf2203012e96e.plex.direct:32400) (60, SSL peer certificate or SSH remote key was not OK) (SSL: no alternative certificate subject name matches target host name ‘172-23-0-1.7bff3dc0cc334f4b99ecf2203012e96e.plex.direct’)  
> Jun 06, 2023 18:45:36.626 [140271146076984] INFO - LibraryUpdateManager path watching is disabled

---

<div class="post-metadata">

**Author:** ![cleverdevil](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/cleverdevil/32/5001_2.png) [@cleverdevil](https://forums.plex.tv/u/cleverdevil)\
**Post date:** [June 8, 2023, 4:53am UTC](https://forums.plex.tv/t/plex-media-server-constantly-backing-up-database/843696/8 "2023-06-08T04:53:32Z")

</div>

Okay, after much troubleshooting and tinkering, I’ve resolved the issue. I restored to a backup of my library, rebooted again, reinstalled PMS, disabled IPv6, and made a few other changes. Some combination of those actions has fixed the issue. Whew!

---

<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:** [September 6, 2023, 4:54am UTC](https://forums.plex.tv/t/plex-media-server-constantly-backing-up-database/843696/9 "2023-09-06T04:54:02Z")

</div>

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