Plex Crashes Every 3 Days at 3:30am Due to System "Out of Memory" Since PMS 1.24.4.5081

Server Version#: 1.24.5.5173

Hi, looking for help with a recent issue I’ve been having.

I’m running DSM 7 on a Synology 1019+ (8GB of memory). I’ve been running this setup since spring of last year with no issues, and I’ve been running DSM 7 for a few months with no issues.

I updated PMS to 1.24.4.5081 on Oct 12. On October 18 at 3:30am, I received consecutive errors that Plex was stopping due to running out of memory. I then had to restart PSM when I wake up. Since then, this occurs every 3 days (10/21, 10/24, 10/27, and 10/30 - today), and I have to restart PMS each time.

I updated PMS to 1.24.5.5173 on 10/27, but this still happened today 10/30. I would really appreciate help on this! I attached my logs, but let me know if I need to provide anymore information!

Plex Media Server Logs_2021-10-30_07-44-38.zip (3.6 MB)

Thanks for your fast response!

I tried optimizing the database a few days ago, but I will do that again now. Backup every 3 days is also enabled.

BUT, the backup location is not where you say it should be. It’s currently set to:
/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-in Support/Databases

I just corrected the backup location and optimized the database. Hopefully this fixes it!

If I may add here?

  1. DSM maintains the permissions of shared folder “PlexMediaServer”. No user intervention should ever be required.

  2. I have seen other reports of crashes. In the end, the root cause of the crashes were outdated user-added plug-ins. I advise reviewing all added plug-ins.

Thanks to both @trumpy81 and @ChuckPa for your help so far!

I have never used any plugins, so that should not be an issue.

If I’m understanding correctly, it sounds like changing the backup location didn’t actually do anything. I also don’t have any plugins. Plex crashed again today at 3:30am. I checked where the backups go, and it looks like the blob is created around an hour before the crashing begins, so I’m not sure if it’s related to the backup? I’ve attached logs that I just exported.

Any ideas about what’s going on or how I might be able to fix it? Thank you!

Plex Media Server Logs_2021-11-02_08-37-26.zip (3.8 MB)

@ChuckPa Hey it looks like Trumpy’s posts are gone, so I assume they’re no longer helping me. I just want to check in and see if I’m still on your radar or if I should be doing something else to move forward?

As I understand it, Trumpy has left Plex.

I will be taking over from this point forward with the assistance of the other Ninjas.

Ah, got it. Anything I should be doing at this point then?

I’m looking at your logs now,

I am seeing this:

Nov 02, 2021 07:53:21.989 [0x7f95458b8b38] DEBUG - Notifying the system bundle an update to server /system/notify/serverUpdated?host=192.168.1.3
Nov 02, 2021 07:53:22.060 [0x7f95458b8b38] DEBUG - Starting file watcher for com.plexapp.system
Nov 02, 2021 07:53:23.400 [0x7f9540cc3b38] WARN - Held transaction for too long (../Statistics/StatisticsManager.cpp:249): 0.810000 seconds
Nov 02, 2021 07:53:27.684 [0x7f95458b8b38] DEBUG - Plugin: setting environment variable: 'PYTHONHOME=/volume1/@appstore/PlexMediaServer/Resources/Python'
Nov 02, 2021 07:53:28.133 [0x7f95458b8b38] DEBUG - Plugin: setting environment variable: 'PYTHONPATH=/volume1/@appstore/PlexMediaServer/Resources/Python/python27.zip:/volume1/@appstore/PlexMediaServer/Resources/Python/lib/python2.7/site-packages'
Nov 02, 2021 07:53:28.958 [0x7f95458b8b38] DEBUG - Spawned plug-in com.plexapp.system with PID 31170
Nov 02, 2021 07:53:28.958 [0x7f95464b2b38] DEBUG - handleStreamWrite code 104: Connection reset by peer
Nov 02, 2021 07:53:29.166 [0x7f95464b2b38] DEBUG - NotificationStream: Removing because of error
Nov 02, 2021 07:53:29.459 [0x7f95458b8b38] DEBUG - [com.plexapp.system] Sending command: GET /:/prefixes

Does that time stamp correlate to anything you saw the server do?

Also, How much memory is installed in the machine?

Yes! I got an email at 7:53 this morning that it ran out of memory, and I had to restart Plex manually after. Looks like you caught what was going on.

I have 8GB of memory, and Plex is basically the only thing running. Usage is generally under 10%.

Thank you! We got it!

Now I can write it up. (They’re gonna love this one! ) hahaha

1 Like

Sweet, thanks so much for digging into this for me! I figure just wait for an update to fix it then?

Yes.

If you feel the earth tremble…

You’ll know they got my bug report

:rofl:

1 Like

Would you please add the following ?

  1. Please stop plex and add this to Preferences.xml
  • LogMemoryUse="1" (preserve spacing with other options)
  1. It will allow us to track what PMS is seeing for memory usage as part of your logs.

  2. We are closing in on the memory issue. It’s starting to look like it occurs when “Refresh All Metadata” occurs (which happens in maintenance) and the database contents satisfy a specific type of records.

Thanks for the update!

I followed your instructions. I am expecting a crash tomorrow morning, so I can upload those logs when that happens!

Here you go! According to DSM, the crash should be somewhere between 4:23 and 5:02 today.

Plex Media Server Logs_2021-11-05_08-49-14.zip (3.1 MB)

@SuperDragonite

May I have the database as well please?

I do see the memory going up and down like a roller-coaster (which it shouldn’t be doing)

@ChuckPa Just confirming, you’d like one of the db backups from /volume1/PlexMediaServer/AppData/Plex Media Server/Plug-in Support/Databases/ right? They’re about 1.6 GB. Is it ok if I upload it to Dropbox/Mega or something similar instead of directly here?

Yes… but get through the GUI please

Settings - Server - Troubleshooting - Download Database

You can send it to the dropbox. At 1.6GB zipped, I already have a darn good idea what we’ll find.

It should be only a few hundred MB if you’re a ‘normal’ user :wink:

Ah, how interesting! Backing it up through the GUI does appear to result in a normal file size, as well.