Memory consumption - DVR/LIveTV Guide

Server Version#: Version 1.16.5.1554
Player Version#: Version 4.4.1 (web client)

Headless ubuntu server VERSION=“18.04.3 LTS (Bionic Beaver)”
Pentium® Dual-Core CPU E6500 @ 2.93GHz
MemTotal: 4030088 kB

Recently migrated to a Linux PMS setup from a MacOS and have noticed that memory on the server gets eaten up within a day or so. If I catch it in time, I can restart PMS over a ssh connection, but if I don’t get it in time, I have to do a hard reboot.
Not much for recordings or use these days, but with the fall tv schedules around the corner, it’ll ramp up.

What the best way to start tracking down this problem? From other threads on the same topic I see the following:

  1. Don’t use DLNA (I’m not)
  2. increase the amount of PMS logs kept to 20
  3. run a script described here
  4. Upload script output and logs to forum.

That sound about right?

Thanks!

If you turn off the DVR/EPG, does the memory leak stop?

I’ll try tomorrow - grabbing some baseline data tonight.

Forgot to ask - how does one turn off the DVR/EPG? Just delete the DVR?

Thanks

Yes. Just delete it.

Are you using XMLTV for your guide data as well? If so it may be related to this post that seems to be getting ignored.

Don’t know - used whatever was default upon install. Is there a setting somewhere I can check?

If you entered you postal code and selected a lineup from Plex then you are not using your own XMLTV file. I know with my issue I can have the dashboard open in a separate window/tab then click refresh guide data in another tab. When I do that I can see the memory usage bump up for the refresh and never drop back down

yes the memory leak stops when the DVR is deleted. I’m going to let it run a bit without the DVR enabled, see if I can get a leak while streaming on different devices.

Leak back when enabled DVR - I can confirm it happens when the Guide refreshes. Any thing else I can do to dig deeper and/or narrow it down?

Thanks. Unfortunately nothing anyone can do until they find it in the DVR code.

Moving this to DVR-LiveTV tagging.

well, here’s a “strings” output of memory dump locations that grow as time progresses.
Might help track down a location in the code to look for the leak. I’ll try this a few more times and see if I can get the same results…

Note: These are both in the heap region.

meierjo@plex2:~$  strings dump_outputfile.7fbab37e8000-7fbab3fe8000.dump
metadata_items.title
metadata
metadata_items.parent_id
metadata_items.user_thumb_url
sett
ary_
statisti
.met
a_type
a.timespa
statisti
statistics_resources.timespan
7-x2
statistics_resources.timespan
statistics_resources.process_memory_utilization
for index_st
ourc
n_timesp@f
statistics_r
cs_reso
usesStmtJournal=0
26.444782257080078125
q:@`
3ga7



meierjo@plex2:~$ strings dump_outputfile.7fbab3fe9000-7fbab47e9000.dump
7-@e
00927
00927
700927
7-@dI
.ple
Stopping file watcher for com.plexapp.agents.plexmusic

Also of note: When I enabled the DVR, I only enabled 149 of the 385 available channels - no SD, no music and only unique HD channels). The memory leak is much slower now.

Going to CRON a nightly restart and forget about it.

Just in case anyone else is on Ubuntu server and needs to set up CRON, don’t forget to set your timezone too! - and use root’s crontab (sudo crontab -e)

Here’s some links:
http://www.christopherirish.com/2012/03/21/how-to-set-the-timezone-on-ubuntu-server/

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