Plex crashes on background maintenance tasks and "runs" out of memory

Hi

Plex crashes and runs out of memory every time when it tries to run scheduled maintenance.
Server has 32gb of ram and there is plenty of free memory. About 20gb, also I added a month ago for testing extra 32gb memory and Plex crashed when it was consumed 27gb.

Syslog clearly states that Plex runs out of memory, but why ? 20gb free memory should be enough or im wrong ?

Jan 21 01:49:48 Tower kernel: Out of memory: Killed process 9469 (Plex Media Serv) total-vm:25323620kB, anon-rss:12553100kB, file-rss:0kB, shmem-rss:4kB, UID:99 pgtables:24812kB oom_score_adj:0

I also added log files, Plex just ran scheduled maintenance. Memory logging to log file is enabled.

Maintenance is scheduled 1:00 to 3:00.
Plex Media Server Logs_2022-01-21_02-08-45.zip (328.0 KB)

As you can see in the picture, it crashed few minutes before 2:00 and started again.
Cpu & Memory graphs: image - pilt.io

Server Version#: v1.25.3.5409-f11334058
Docker image: linuxserver/plex

Thank you for the logs

We have just fixed one cause of excessive memory use in beta 1.25.4.5426 but it does not look like it is that

  • (Metadata) Some users could end up with massive amounts of duplicate extras (#13241)

Could i have a copy of the database

Is the xmltv setup for DVR using an xmltv file - if it is, please let me have a copy of it

Sent a private message for you with link

thank you!

@sa2000 any updates ?

Looked at the database and logs and there is nothing obvious - I have referred it to the development team - might need a mini dump captured when memory spike in progress = you can try by doing a kill -SEGV <pid> and see if a dump file gets created by breakpad - we normally copy the dump file to where $TEMPDIR is set - but I am not sure what that would be for your linuxserver.io docker environment

If you manage it - send me zipped mini dump file and debug server logs with memory usage and another copy of the db and also the other 2 dbs = the blobs db and the xmltv tv.plex database for epg and fresh copy of the xmltv file

thanks

Yesterday i updated to 1.25.4.5468 and last maintenance went well, no crash. Lets see if that was the fix…

Has the problem gone away?

Seems so… I added more memory to server. Now maintenance takes about 32gb ram.

That is excessive - could you run with memory usage logging enabled - see LogMemoryUse setting described here Advanced, Hidden Server Settings | Plex Support

and capture server logs in the morning after scheduled tasks run

Thanks

PM sent with log file.

Thank You - i see it spiked to close to 13Gb at 10:22

It could be related to Intro Detection
I have added your diagnostics to the existing open issue

Thanks

1 Like

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