Plex Server Becomes Unavailable Overnight

Hi, almost daily, I have to reboot my NAS to get my Plex libraries online. I have no trouble accessing the library through the NAS interface, but Plex constantly shows the server is unavailable until after I do a NAS reboot. It doesn’t do it every time, but enough to be irritating.

Server Version#:Version 4.152.0

@simondjjones_gmail_com

  1. Version 4.152.0 is the Plex/Web version
  2. You can confirm PMS version in Settings - Server - General or in Package Center.
  3. Plex.tv reports you are using 1.43.0.10346-fc911a729 on a DS220+

Is this correct?

If so, When it stops, 60 seconds after you restart it, would you please download the server logs zip file (Settings - Server - Troubleshooting - Download Logs) and attach it here?

Hi ChuckPa, thanks for your quick response.

Yes, correct on all counts. The issue did not occur today, but has persisted over many months and OS/SW updates.

I will update with logs at the next event.

Had another unavailable event. Logs attached.

Plex Media Server Logs_2025-11-29_12-24-20.zip (730.2 KB)

@simondjjones_gmail_com

Thanks for the logs.

You definitely have some issues in there :see_no_evil_monkey: lol

I normally prefer DEBUG logging but this shows what’s happening very well.

Nov 29, 2025 12:14:37.574 [140571618970424] WARN - [Req#1eeda] QueryParser: Invalid field 'pinnedContentDirectoryID' found, ignoring.
Nov 29, 2025 12:14:41.055 [140571592178488] ERROR - [Req#1eedb] Unknown metadata type: folder
Nov 29, 2025 12:14:44.017 [140571621079864] ERROR - Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:14:44.018 [140571637300024] ERROR - Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:14:54.230 [140571621079864] ERROR - Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:14:54.231 [140571637300024] ERROR - Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:15:04.438 [140571621079864] ERROR - Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:15:04.449 [140571637300024] ERROR - Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:15:04.639 [140571621079864] ERROR - Thread: Uncaught exception running async task which was spawned by thread 140571633081144: sqlite3_statement_backend::loadOne: database is locked
Nov 29, 2025 12:15:04.649 [140571637300024] ERROR - Thread: Uncaught exception running async task which was spawned by thread 140571633081144: sqlite3_statement_backend::loadOne: database is locked
Nov 29, 2025 12:15:14.648 [140571621079864] ERROR - Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:15:14.658 [140571637300024] ERROR - Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:15:24.865 [140571621079864] ERROR - Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:15:24.874 [140571637300024] ERROR - Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:15:35.080 [140571621079864] ERROR - Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:15:35.090 [140571637300024] ERROR - Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:15:45.290 [140571621079864] ERROR - Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:15:45.300 [140571637300024] ERROR - Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:15:55.502 [140571621079864] ERROR - Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:15:55.523 [140571637300024] ERROR - Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:16:05.720 [140571621079864] ERROR - Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:16:05.740 [140571637300024] ERROR - Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:16:15.931 [140571621079864] ERROR - Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:16:15.951 [140571637300024] ERROR - Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:16:26.148 [140571621079864] ERROR - Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:16:26.168 [140571637300024] ERROR - Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:16:36.364 [140571621079864] ERROR - Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:16:36.388 [140571637300024] ERROR - Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:16:41.028 [140571594287928] ERROR - [Req#1eee9] Waited over 10 seconds for a busy database; giving up.
Nov 29, 2025 12:16:41.028 [140571594287928] ERROR - [Req#1eee9] Failed to begin transaction (/home/runner/_work/plex-media-server/plex-media-server/Statistics/Device.cpp:46) (tries=1): Cannot begin transaction. database is locked

Your database is so fragmented that it cannot function which causes PMS to crash under load.

The solution is to run DBRepair and optimize the DB properly (PMS can’t optimize itself at this depth)

How are your SSH command line skills ?

Wow, interesting, thank you very much for the insight. My SSH skills are entirely non-existent, but I’ll see if there is a Synology App that might serve the purpose. Thanks again!

If you want, I think I can make time to help you tomorrow

We would need some way to commicate voice (I use apple products)

We would also use a tool RustDesk (an app) on your computer for desktop sharing.

I’d come in and, with you there at all times to login / access control, get into SSH and teach you how to run DBRepair yourself.

After that, you’ll be able to do it yourself as needed.

Here’s the tool I’ve written

1 Like

ChuckPa, thank you for your very kind offer. For now I’m trying the built-in defragmenter and scrubbing the drives. If the issue persists thereafter I’ll take a look at the tool to see if I can figure it out. Once upon a time I knew my way around a CLI (<DOS 5, lol), so I’ll give it the ol’ college try. Thank you once again for quickly identifying the issue.

The filesystem defragmenter won’t help here.

The records in the DB are what’s fragmented (grossly out of order)

If you look in the README.md file (under DBRepair),

you’ll find where I show how to do it on Synology.

If you used to know the CLI then this should be as easy as getting back on that tricycle :slight_smile: lol

Good day ChuckPa. I was able to run your utility and it seems to have fixed the issue. I also noticed it’s a lot more responsive to load my libraries. I had never run any optimization or otherwise maintained the database previously, so this was an eye opener and a big help.

Do you recommend that I run the Plex optimization now? Or should I work solely with the utility on a regular basis?

Simon

@simondjjones_gmail_com

You don’t need to run the built-in Optimize Databases . DBRepair does a better job (because PMS is shut down during the process).

You can run the built-in Optimize Databases weekly if you want and then DBRepair when you notice it getting sluggish or you have other issues (it checks for DB damage)

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