# \[SOLVED\] Database Size Suddenly 13 GIG

**URL:** <https://forums.plex.tv/t/solved-database-size-suddenly-13-gig/920283>\
**Category:** Plex Media Server\
**Tags:** server-linux, server-synology, plex-web\
**Created:** [May 27, 2025, 12:09pm UTC](https://forums.plex.tv/t/solved-database-size-suddenly-13-gig/920283 "2025-05-27T12:09:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mpalermo73](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mpalermo73/32/163296_2.png) [@mpalermo73](https://forums.plex.tv/u/mpalermo73)\
**Post date:** [May 27, 2025, 12:09pm UTC](https://forums.plex.tv/t/solved-database-size-suddenly-13-gig/920283/1 "2025-05-27T12:09:31Z")

</div>

Server Version#: 1.41.7.9823  
Player Version#:

 ![Screenshot_20250527_080050](https://global.discourse-cdn.com/plex/original/4X/9/f/3/9f392f0744104d559c30afd319fe18ccaf7c67c1.png)

I don’t know what changed, but it is NOT for the better.

Long story short, I sync all my backups to Google Drive. I received a space warning yesterday and dug into it. I had two previous backups that were 12.5G which I deleted off the disk to remove them from google drive. That is wy eagle eyed people will notice a couple dates missing. I let another back happen last night and now it’s 13G!

I used `sqlite-analyzer` on the back to identify where all the space is used in the DB file.

```auto
STATISTICS_BANDWIDTH.............................. 12588095 98.5%

```

```auto
***Table STATISTICS_BANDWIDTH and all its indices****************************

Percentage of total database...................... 98.5%

```

Why all of the sudden is the statistics bandwidth table ballooning up to several gig of size??? I’ve been using Plex for… somewhere nearly a decade I think? I’ve never - NEVER - seen the DB more than a couple hundred meg.

---

<div class="post-metadata">

**Author:** ![ChristianKent](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@ChristianKent](https://forums.plex.tv/u/ChristianKent)\
**Post date:** [May 27, 2025, 12:11pm UTC](https://forums.plex.tv/t/solved-database-size-suddenly-13-gig/920283/2 "2025-05-27T12:11:58Z")

</div>

There are many posts about this. There are solutions on those threads.

---

<div class="post-metadata">

**Author:** ![mpalermo73](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mpalermo73/32/163296_2.png) [@mpalermo73](https://forums.plex.tv/u/mpalermo73)\
**Post date:** [May 27, 2025, 12:40pm UTC](https://forums.plex.tv/t/solved-database-size-suddenly-13-gig/920283/3 "2025-05-27T12:40:25Z")

</div>

I see that now. I can’t explain why searching wasn’t helping me before.

---

<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:** [May 27, 2025, 6:25pm UTC](https://forums.plex.tv/t/solved-database-size-suddenly-13-gig/920283/4 "2025-05-27T18:25:25Z")

</div>

@mpalermo73

There is a bug in some 1.41.7 beta releases that caused the massive db growth.

v1.41.7.9799 and v1.41.7.9823 stop the growth, but do not shrink the db back to normal.

Plex will have a fix to shrink the growth in an upcoming release (availability tbd).

To shrink things now, you can use the [DBRepair for Plex Media Server](https://github.com/ChuckPa/DBRepair) tool.

To use the tool, SSH into the NAS, download and run the tool.

STOP Plex Media Server, then use the AUTO option.

The process will take a long time, as in hours. Deleting the statistics is single threaded, using only one CPU core, and Synology NAS have low power CPUs.

This is for an install via Synology Package Center (“bare metal”). If you are using Docker, see the README on GitHub for additional information.

```auto
# change to the PlexMediaServer directory. Volume 1 is default, adjust if using different location.
cd /volume1/PlexMediaServer

# download DBRepair.sh, -O means overwrite an existing file if one is present.
sudo wget -O DBRepair.sh https://github.com/ChuckPa/DBRepair/releases/latest/download/DBRepair.sh

# make it executable
sudo chmod a+x DBRepair.sh

# run it (interactive)
sudo ./DBRepair.sh

# can also run non-interactively
sudo ./DBRepair stop auto start exit

```

FYI, there is another option. It is a little more work, but potentially much faster if you have a system (PC, Mac, etc.) with a faster CPU and SSD.

1. Install PMS on the PC and claim the server. No need to create libraries, etc.
2. On the new server, Settings → Library: disable `Empty trash automatically after every scan` (enabled by default).
3. Stop PMS on both systems.
4. Copy the `com.plexapp.plugins.library.db` and `com.plexapp.plugins.library.blobs.db` files from the NAS to the PC.
5. Using Plex SQLite, manually issue the SQLite commands to delete the info from the database.
6. When finished, copy the db files back to the NAS and start PMS.

See [Library.db size more than doubled in latest version - #207 by FordGuy61](https://forums.plex.tv/t/library-db-size-more-than-doubled-in-latest-version/918851/207) for additional information on how to manually run the commands. Three different methods are listed. All work equally well. The DBRepair tool uses #3.

---

<div class="post-metadata">

**Author:** ![mpalermo73](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mpalermo73/32/163296_2.png) [@mpalermo73](https://forums.plex.tv/u/mpalermo73)\
**Post date:** [May 28, 2025, 10:52am UTC](https://forums.plex.tv/t/solved-database-size-suddenly-13-gig/920283/5 "2025-05-28T10:52:44Z")

</div>

Thank you for putting this all in one place like this. This is immensely helpful. I have ran the repair utility and my DB is down to 187M. It took just under 12 hours.

M.

---

<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:** [August 26, 2025, 10:53am UTC](https://forums.plex.tv/t/solved-database-size-suddenly-13-gig/920283/6 "2025-08-26T10:53:37Z")

</div>

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