Plex Crashes Every week shortly after scheduled tasks start

Server Version#: 1.43.0.10389

Every Thursday a little after 5am (when scheduled tasks are set to run) my server becomes unresponsive and I have to restart the plex container. I have a script that watched for the plex container to become unhealthy for 5 minutes before restarting the container.

I suspect it’s due to the weekly database optimization or one of the other weekly tasks. I have run the PlexDBRepair tool multiple times on my database over the past few months but it hasn’t had any effect on this behavior.

I don’t have any logs to attach this time as I had verbose logging on up until now but I will attach debug logs next time.

Are there any other proactive steps I can take?

Does Plex Media Server crash or is it still running but non-responsive?

What is the size of the Plex database files? Are they abnormally large - 10s or 100s of GB?

Possible “DB Bloat” Problem:

If the db files are abnormally large, then you may be experiencing the “db bloat” bug that afflicted some releases of PMS 1.41.7. Plex Media Server could be trying to clean up the database files. The process runs once per week during scheduled tasks, may take hours, and Plex will be running, but non-responsive until it finishes.

You can speed up the process by running DBRepair and choosing the DEFLATE then AUTO options. Update to the current version of DBRepair first..

DBRepair can clean things up faster than PMS because PMS is stopped and the database is closed.


If db bloat is not the problem, a set of debug logs that capture the problem will be needed.

Before you start disabling scheduled tasks…

  1. Make sure Plex is configured for debug level logs.
  2. Disable the auto-restart script.
  3. After the problem occurs, restart Plex Media Server.
  4. Wait 2 - 3 minutes for PMS to fully boot and log the startup sequence.
  5. Pull the log files (settings → troubleshooting) and post the entire zip file to the thread.

Disabling the auto-restart script lets you control when Plex restarts. It also ensures the log files will not rotate too many times, possibly losing desired information.

Does Plex Media Server crash or is it still running but non-responsive?

It crashes as there is a crash report being sent at that time.

What is the size of the Plex database files? Are they abnormally large - 10s or 100s of GB?

See screenshot below.

If the db files are abnormally large, then you may be experiencing the “db bloat” bug that afflicted some releases of PMS 1.41.7. Plex Media Server could be trying to clean up the database files. The process runs once per week during scheduled tasks, may take hours, and Plex will be running, but non-responsive until it finishes.

You can speed up the process by running DBRepair and choosing the DEFLATE then AUTO options. Update to the current version of DBRepair first..

DBRepair can clean things up faster than PMS because PMS is stopped and the database is closed.

I’ve run the latest version of the DBRepair multiple times over the past month. I’m pretty confident I’ve run deflate at least once but I can try it again.

If db bloat is not the problem, a set of debug logs that capture the problem will be needed.

Before you start disabling scheduled tasks…

  1. Make sure Plex is configured for debug level logs.

  2. Disable the auto-restart script.

  3. After the problem occurs, restart Plex Media Server.

  4. Wait 2 - 3 minutes for PMS to fully boot and log the startup sequence.

  5. Pull the log files (settings → troubleshooting) and post the entire zip file to the thread.

Disabling the auto-restart script lets you control when Plex restarts. It also ensures the log files will not rotate too many times, possibly losing desired information.

I’ve configured debug level logs and I will disable take care of the rest for next week in preparation of this happening again.

Thanks for the update.

Deflate + Auto will rule out any structural problems with the database. DBRepair does not look at content, so there could still be a db issue.

I’ve never heard of removing old bundles or cache files causing problems (the other weekly tasks listed in settings → scheduled tasks).

If you want, you can use WebTools-NG to kick off the database optimization, instead of waiting for a week to pass. You can start other tasks as well.

It talks to Plex via API calls. You can run it from a PC, Mac, or Linux system. It does not have to run on the server itself.

You’ll use the Butler Scheduled Tasks portion of the tool (In the Plex log files, scheduled tasks are referred to as Butler tasks.).

Wiki: Butler Scheduled Tasks · WebTools-NG/WebTools-NG Wiki · GitHub
Download: Release 1.2.1 · WebTools-NG/WebTools-NG · GitHub