DS918+ Plex Media Server RAM Leak

Server Version#: 1.13.9.5456
Player Version#: N/A

Noticed over the last 2 weeks or so that there seems to be a potential memory leak with PMS. As you can see in the attached images there is a gradual climb in RAM utilization and after I manually restart the Plex Media server application RAM goes back down to normal levels. Before I noticed this, RAM would spike periodically during trasncoded sessions but would then return back to normal levels.

Any else seeing this on their Synology servers?

2018-11-15%2008_37_01-BeilNAS%C2%A0-%C2%A0Synology%C2%A0DiskStation 2018-11-15%2008_46_23-BeilNAS%C2%A0-%C2%A0Synology%C2%A0DiskStation

Nice graphic but I need more to go on than just that please.

What changed?

  1. PMS version?
  2. Media being played (Codec)?
  3. DSM Updates?
  4. Other apps added?

Please expound

Only thing that has changed is the PMS version, no updates to DSM, this happens irregardless of media being played or not, and no other apps were added.

At minimum, I need to see the log files, and know which version you were running.

Not sure which log is the right one, attached the whole download. Server Version#: 1.13.9.5456.Plex Media Server Logs_2018-11-15_12-13-02.zip (3.8 MB)

THanks… The entire zip is best. I can also check all the subsystems at the same time

HOWEVER,

Would you please DISABLE Verbose logging until requested?

Verbose yields only 2 minutes of playback time.
All the data I need is long flushed from the buffer.

  1. Please set DEBUG logging only
  2. Restart PMS
  3. Playback just enough to recreate
  4. Stop Playback
  5. Wait 30 seconds
  6. Obtain ZIP again
  7. Attach

Thanks.

Sorry about that! Reattached following your instructions. I noted that this entire time the RAM load was as expected (total RAM utilization at around 30%) throughout entire playback. If this follows the same trend as previous weeks, Plex’s RAM utilization will continue to rise until I restart Plex again at which point it comes back down to a reasonable level.

Plex Media Server Logs_2018-11-15_14-21-19.zip (3.4 MB)

I’m also seeing this behavior on the latest official Docker image running on Fedora Core 28 (running in ESXI). I actually have re-set up my server a few times in the hope that it was something that I did in the docker setup, but it doesn’t seem to be the case.

I do not have the generation of preview or chapter thumbnails enabled. I also am not analyzing audio tracks (as I haven’t added a music library the last time I set up the container).

Currently, the container itself is holding onto just under 4GB of memory at 10 minutes (It was hitting 6GB, which in turn was maxing out the 8GB that I have assigned to the VM) after playing a movie with some transcoding. It’s currently not really causing any issues for me, but I’d rather it not be spilling over into SWAP if I can help it since it’s running on a SSD.

I’ve tried hardware encoding off and on as well.

I’ll get some logs attached at some point if it’d help.

Please do not confuse docker with native PMS. IT has different conditions and operational environment.

I understand that. Just stating my experience in case there’s a possible common issue.

I have these enabled but already had them set to run as a task. During those hours, PMS ramps up CPU usage (as expected) but does not have any noticable effect to RAM usage. It’s quick clear there are spikes in CPU load during maintenance hours but not for RAM (odd).

Either way, I’m not sure how this is relevant to a slowly ramping up memory load that is reset by restarting PMS.

Just wanted to provide an update: I did a fresh PMS install and it corrected my issue.

Could you clarify what yo mean with ā€œfresh installā€ ? Did you remove entire library etc? I’m suspecting similar issues but would prefer to not have to spend hours of building my library up again. (It should of course be quick, but in practice that has unfortunately never been the case).

I also have this issue. Hasn’t been too much of an issue as the NAS has been restarted every few days, but today the app on the TV started buffering and when I tried to investigate I couldn’t access the NAS - it was to busy. Ended up having to shut it down (killed UPS power so it would shut down gracefully).
DS918+
Plex 1.14.0.5470
LG Smart Tv x 2 Samsung x 1
No Thumbnails or previews being generated.
I’ve enabled logging now.

Get back to us when you have logs.

FYI. If you press and hold the Blue power button until it beeps, DSM will perform an orderly shutdown. BE ADVISED If you continue to hold it, it will Power Off which is not desired.

Do you by chance have your APK for .5470? I would likee to upgrade to that over the newest build.

Here are the log files. Started from a complete new log through to the end off today. RAM usage went from 7% at start through to 87% tonight. When I stopped Plex RAM dropped back to 2% then 7% when Plax was restarted.
Logs.7z (3.0 MB)

Sorry, I don’t normally keep SPK files after they’ve been applied.

Thanks for the logs. There’s a lot going on in there.

  1. THere is an MP4 file playing here. Its index timestamps are just wildly out of range. While it may play in other players, PMS is more strict about it.
Plex Media Server.4.log:Dec 21, 2018 13:01:45.068 [0x7fde09847700] ERROR - [Transcoder] [mp4 @ 0x32a5c40] Application provided duration: -32 / timestamp: 83259304 is out of range for mov/mp4 format
Plex Media Server.4.log:Dec 21, 2018 13:01:45.205 [0x7fde09b35700] ERROR - [Transcoder] [mp4 @ 0x32a5c40] Application provided duration: -32 / timestamp: 86467480 is out of range for mov/mp4 format
Plex Media Server.4.log:Dec 21, 2018 13:02:03.284 [0x7fde2bbff700] WARN - LongPoll: Got error, closing.
Plex Media Server.4.log:Dec 21, 2018 13:02:03.286 [0x7fde2b911700] DEBUG - NotificationStream: Removing because of error
Plex Media Server.4.log:Dec 21, 2018 13:03:37.807 [0x7fde2b911700] WARN - LongPoll: Got error, closing.
Plex Media Server.4.log:Dec 21, 2018 13:03:41.910 [0x7fde221a1700] DEBUG - Job running: EAE_ROOT='/volume1/Plex/tmp_transcoding/pms-c8215932-5a9c-49f4-981a-8e4bdbb9ab20/EasyAudioEncoder' FFMPEG_EXTERNAL_LIBS='/volume1/Plex/Library/Application\ Support/Plex\ Media\ Server/Codecs/531e313-1328-linux-ubuntu-x86_64/' XDG_CACHE_HOME='/volume1/Plex/Library/Application Support/Plex Media Server/Cache' XDG_DATA_HOME='/volume1/@appstore/Plex Media Server/Resources' X_PLEX_TOKEN='xxxxxxxxxxxxxxxxxxxx' '/volume1/@appstore/Plex Media Server/Plex Transcoder' '-codec:0' 'h264' '-noaccurate_seek' '-probesize' '10000000' '-i' '/volume1/PlexMedia/Miscellaneous/The Magical World of J.K.Rowling (2000)/The Magical World of J.K.Rowling (2000).mkv' '-map' '0:0' '-metadata:s:0' 'language=eng' '-codec:0' 'copy' '-map' '0:1' '-metadata:s:1' 'language=eng' '-codec:1' 'copy' '-copypriorss:1' '0' '-f' 'dash' '-min_seg_duration' '5000000' '-skip_to_segment' '1' '-time_delta' '0.0625' '-manifest_name' 'http://127.0.0.1:32400/video/:/transcode/session/7bl97dmvl79obtl7d195txyd/8805ed98-9409-4c0a-adf1-2e4b1cdd2f08/manifest' '-avoid_negative_ts' 'disabled' '-map_metadata' '-1' '-map_chapters' '-1' 'dash' '-start_at_zero' '-copyts' '-vsync' 'cfr' '-y' '-nostats' '-loglevel' 'quiet' '-loglevel_plex' 'error' '-progressurl' 'http://127.0.0.1:32400/video/:/transcode/session/7bl97dmvl79obtl7d195txyd/8805ed98-9409-4c0a-adf1-2e4b1cdd2f08/progress'
Plex Media Server.4.log:Dec 21, 2018 13:03:42.395 [0x7fde09847700] ERROR - [Transcoder] [mp4 @ 0x1cdd140] Application provided duration: -32 / timestamp: 10216360 is out of range f

This looks like a bad installation. Something either damaged your PMS installation or that TV ID is completely unknown (which doesn’t make sense)

Plex Media Server.4.log:Dec 21, 2018 11:14:20.962 [0x7fde26623700] ERROR - Unable to find client profile for device; platform=webOS, platformVersion=4.1.0, device=, model=65UK6540PTD

It was released in May so there shouldn’t be any question about it falling into WebOS.

I will have to ask the TV App team to take a look at this part.

  1. Another issue I see is this.
Plex Media Server.5.log:Dec 21, 2018 10:47:43.021 [0x7fde1f911700] ERROR - [MediaInspectorFreeImage] strptime on 0000:00:00 00:00:00 failed
Plex Media Server.5.log:Dec 21, 2018 10:47:43.024 [0x7fde1f911700] ERROR - [MediaInspectorFreeImage] strptime on 0000:00:00 00:00:00 failed

Are there attached/embedded images in some of your files?
I’m not trying to redirect here but somehow I think part of what’s happening is PMS is falling into a hole and most likely not cleaning up cleanly after an error of this type. I can do something about that.

  1. Do you mind seeing if we can repeat this on just one file (this one),
    Create a ā€˜cleaned up’ version (saving your original)
    Attempt to play it again
    See what the logs show next time

  2. Also, May I request you use the Download Logs button to retrieve Logs?
    I"m not equiped to handle 7z (I work in Linux and 7zip is command line only but my editors are graphical… it gets VERY messy)

I have a couple of days next week when the system won’t be in use at all. Would it be worth blowing it away and re-installing PMS from scratch?

I appreciate the analysis you’ve done but if it’s a corruption I’m probably going to end up doing a re-install anyway.