Plex Transcoder OOM

Server Version#: plexmediaserver-1.20.4.3517-ab5e1197c.x86_64
Player Version#: 6.6.16.6715 (Roku)

Hello,

The transcoder for my Plex instance has been going OOM for some media.

The transcoder will be chugging along fine and then suddenly spikes in memory usage, enough to trigger an OOM event. It spiked from around 400m resident size, to 3G in a matter of seconds. This does not seem right at all.

My server has 6GB right now and is fine for most shows. The ones it has trouble with will play most of the way through, but the last 5 minutes memory usage spike and triggers an OOM.

What can I look at? There are OOM log entries but nothing else useful from Plex. Are there advanced transcoder settings I can look at, besides what is available through the web ui?

Thanks

There’s nothing to look at in the UI.

what is helpful is being able to look at the log files ZIP.

If it’s going nuts in those last 5 minutes:

  1. Verify DEBUG logging is ON,
  2. Verify VERBOSE logging is OFF, (we won’t get more than 2 minutes worth if on)
  3. Start the playback
  4. When it spikes, Stop playback
  5. Let it settle
  6. Download the Logs ZIP.
  7. Download the XML for the file played which caused it.

Attach both please.

Thanks for the reply, here are the logs. Edit: Forgot to disable verbose mode first time

problem_media_xml.txt (4.1 KB)
(File removed)

As a workaround I’m able to increase swap size. It got to a max of 7GB and the media can finish playing, at the expense of IO.

It buffers now instead of crashing but its still annoying that memory usage jumps so high so quickly.

May I have the full log file please?

This sanitized / shortened version doesn’t show me the invocation (which is what I need to see)

Nov 23, 2020 11:30:22.866 [0x7feb857fa700] DEBUG - [Transcode] MDE: Selected protocol hls; container: mpegts
Nov 23, 2020 11:30:22.866 [0x7feb857fa700] DEBUG - [Transcode] MDE: analyzing media item 95329
Nov 23, 2020 11:30:22.866 [0x7feb857fa700] DEBUG - [Transcode] MDE: E2 - The Vanishing Children: Direct Play is disabled
Nov 23, 2020 11:30:22.866 [0x7feb857fa700] DEBUG - [Transcode] MDE: E2 - The Vanishing Children: media must be transcoded in order to use the hls protocol
Nov 23, 2020 11:30:22.866 [0x7feb857fa700] DEBUG - [Transcode] MDE: E2 - The Vanishing Children: selected audio stream is not the first audio stream and direct play stream selection is not enabled
Nov 23, 2020 11:30:22.866 [0x7feb857fa700] DEBUG - [Transcode] The Vanishing Children - video.bitDepth limitation applies: 10 > 8
Nov 23, 2020 11:30:22.866 [0x7feb857fa700] DEBUG - [Transcode] MDE: E2 - The Vanishing Children: selected subtitle cannot be converted to a compatible format, burning into video stream
Nov 23, 2020 11:30:22.866 [0x7feb857fa700] DEBUG - [Transcode] MDE: E2 - The Vanishing Children: avoiding video remux due to burned subtitle stream
Nov 23, 2020 11:30:22.866 [0x7feb857fa700] DEBUG - [Transcode] MDE: E2 - The Vanishing Children: no remuxable profile found, so video stream will be transcoded
Nov 23, 2020 11:30:22.866 [0x7feb857fa700] DEBUG - [Transcode] MDE: Cannot direct stream video stream due to profile or setting limitations
Nov 23, 2020 11:30:22.866 [0x7feb857fa700] DEBUG - [Transcode] Scaled up video bitrate to 13041Kbps based on 3.000000x fudge factor.
Nov 23, 2020 11:30:22.866 [0x7feb857fa700] DEBUG - [Transcode] MDE: E2 - The Vanishing Children: Audio Direct Streaming is disabled, so video's audio stream will be transcoded
Nov 23, 2020 11:30:22.866 [0x7feb857fa700] DEBUG - [Transcode] MDE: Cannot direct stream audio stream due to profile or setting limitations
Nov 23, 2020 11:30:22.866 [0x7feb857fa700] DEBUG - [Transcode] MDE: Shinsekai yori - S1 E2 - The Vanishing Children: selected media 0 / 95329
Nov 23, 2020 11:30:22.866 [0x7feb857fa700] DEBUG - [Transcode] Streaming Resource: Session 0x7feb501465c0:b7e1b4064adbb01daeb8bbd6658a2ea8 changed transcode slot usage to used.  Used slots is now 1
Nov 23, 2020 11:30:22.866 [0x7feb857fa700] DEBUG - [Transcode] Streaming Resource: Reached Decision id=88006 codes=(General=1001,Direct play not available; Conversion OK. Direct Play=3000,App cannot direct play this item. Direct play is disabled. Transcode=1001,Direct play not available; Conversion OK.) media=(id=95329 part=(id=96995 decision=transcode container=mpegts protocol=hls streams=(Video=(id=115997 decision=transcode bitrate=11205 encoder=libx264 width=1920 height=1080) Audio=(id=115999 decision=transcode bitrate=151 encoder=aac channels=2 rate=48000) Subtitle=(id=116000 decision=burn languageCode=eng location=embedded))))
Nov 23, 2020 11:30:22.866 [0x7febabfff700] DEBUG - Completed: [192.168.0.44:55106] 200 GET /video/:/transcode/universal/decision?protocol=hls&mediaIndex=0&waitForSegments=1 (5 live) TLS GZIP 5ms 1792 bytes (pipelined: 15)
Nov 23, 2020 11:30:23.282 [0x7febab7fe700] DEBUG - Auth: authenticated user 1 as kschafer2598
Nov 23, 2020 11:30:23.282 [0x7feb857fa700] DEBUG - Request: [192.168.0.44:55121 (Subnet)] GET /video/:/transcode/universal/start.m3u8?protocol=hls&mediaIndex=0&waitForSegments=1 (6 live) TLS GZIP Signed-in Token (kschafer2598)
Nov 23, 2020 11:30:23.282 [0x7feb857fa700] DEBUG - [Transcode] Found session GUID of 5ae0ad75-c3e1-4169-9306-868d4801ad7e-154 in session start.
Nov 23, 2020 11:30:23.282 [0x7feb857fa700] DEBUG - [Transcode] TranscodeUniversalRequest: using augmented profile Roku-7.x
Nov 23, 2020 11:30:23.282 [0x7feb857fa700] DEBUG - [Transcode] Downloading document http://127.0.0.1:32400/library/metadata/88006?checkFiles=1&includeBandwidths=1&offset=0&X-Plex-Client-Capabilities=videoDecoders%3dh264%7bprofile%3ahigh%26resolution%3a1080%26level%3d41%7d%3baudioDecoders%3daac%7bchannels%3a2%7d&X-Plex-Incomplete-Segments=1&X-Plex-Session-Identifier=b7e1b4064adbb01daeb8bbd6658a2ea8
Nov 23, 2020 11:30:23.282 [0x7feb857fa700] DEBUG - [Transcode] Auth: authenticated user 1 as kschafer2598
Nov 23, 2020 11:30:23.285 [0x7feb857fa700] DEBUG - [Transcode] Audio Stream: 115999, Subtitle Stream: 116000
Nov 23, 2020 11:30:23.286 [0x7feb857fa700] DEBUG - [Transcode] Found session GUID of 5ae0ad75-c3e1-4169-9306-868d4801ad7e-154 in session start.
Nov 23, 2020 11:30:23.286 [0x7feb857fa700] DEBUG - [Transcode] Using session GUID 5ae0ad75-c3e1-4169-9306-868d4801ad7e-154 for new transcode session.
Nov 23, 2020 11:30:23.286 [0x7feb857fa700] DEBUG - [Transcode] Cleaning directory for session 5ae0ad75-c3e1-4169-9306-868d4801ad7e-154 ()
Nov 23, 2020 11:30:23.286 [0x7febab7fe700] DEBUG - Completed: [192.168.0.44:55121] 200 GET /video/:/transcode/universal/start.m3u8?protocol=hls&mediaIndex=0&waitForSegments=1 (6 live) TLS GZIP 4ms 483 bytes (pipelined: 1)
Nov 23, 2020 11:30:23.362 [0x7febab7fe700] DEBUG - Auth: authenticated user 1 as kschafer2598
Nov 23, 2020 11:30:23.362 [0x7feb85ffb700] DEBUG - Request: [192.168.0.44:55121 (Subnet)] GET /video/:/transcode/universal/session/5ae0ad75-c3e1-4169-9306-868d4801ad7e-154/base/index.m3u8?protocol=hls&mediaIndex=0&waitForSegments=1 (6 live) TLS GZIP Signed-in Token (kschafer2598)
Nov 23, 2020 11:30:23.362 [0x7feb85ffb700] DEBUG - [Transcode] Found session GUID of 5ae0ad75-c3e1-4169-9306-868d4801ad7e-154 in session start.
Nov 23, 2020 11:30:23.362 [0x7feb85ffb700] DEBUG - [Transcode] Starting a transcode session 5ae0ad75-c3e1-4169-9306-868d4801ad7e-154 at offset -1.0 (state=3)
Nov 23, 2020 11:30:23.363 [0x7feb85ffb700] DEBUG - [Transcode] [Universal] Using local file path instead of URL: /media/torrent/active/series/From.the.New.World.-.[1080p.BluRay.x264].[10bit].[DHD]/From.the.New.World.-.02.-.[1080p.BluRay.x264].[10bit].[DHD].mkv
Nov 23, 2020 11:30:23.363 [0x7feb85ffb700] DEBUG - [Transcode] Job running: EAE_ROOT='/tmp/pms-8ed0c654-1ef6-4a05-b762-94ef96a8c9a3/EasyAudioEncoder' FFMPEG_EXTERNAL_LIBS='/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/7c50c14-3596-linux-x86_64/' XDG_CACHE_HOME='/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache' XDG_DATA_HOME='/usr/lib/plexmediaserver/Resources' X_PLEX_TOKEN='xxxxxxxxxxxxxxxxxxxx' '/usr/lib/plexmediaserver/Plex Transcoder' '-codec:0' 'h264' '-codec:2' 'aac' '-analyzeduration' '20000000' '-probesize' '20000000' '-i' '/media/torrent/active/series/From.the.New.World.-.[1080p.BluRay.x264].[10bit].[DHD]/From.the.New.World.-.02.-.[1080p.BluRay.x264].[10bit].[DHD].mkv' '-filter_complex' '[0:3]scale=1920:1080[0];[0:0][0]overlay[1];[1]scale=w=1920:h=1080[2];[2]format=pix_fmts=yuv420p|nv12[3]' '

Sorry about that, I guess I trimmed too much. I waited a bit before starting it this time.

(File removed)

I don’t know what you changed / did but now it’s a mess.

Please just recreate the problem and download and attach the ZIP file it gives you as-is. (it’ll only be 3-5 MB)

This is what I got

I’m able to download and unzip those logs just fine… thats weird. Here’s another log bundle right after recreating the issue without any “sanitizing” by me.

(File removed)

Your patience is very much appreciated… you are trying to help and I ended up making it harder. Thank you.

I think i figured out what’s happening to the log files.

The “Code Page” they are being written with, which is part of the locale settings. is not initialized.

You might want to consider regenerating your locale files and verifying LANG environment variable … e.g LANG=en_US.UTF-8

The UTF-8 is the important part.

You do have some damaged media which was found.
Not sure why these would cause problems but , if you can save these / take them away from PMS, maybe we can isolate further.

Plex Media Scanner Analysis.1.log:Nov 24, 2020 02:02:12.093 [0x7ffb65b267c0] ERROR - Failed to successfully analyze part 40176.
Plex Media Scanner Analysis.1.log:Nov 24, 2020 02:02:12.115 [0x7ffb65b267c0] ERROR - Format [JPEG] - Not a JPEG file: starts with 0xda 0x09
Plex Media Scanner Analysis.1.log:Nov 24, 2020 02:02:12.115 [0x7ffb65b267c0] ERROR - Failed to successfully analyze part 71222.
Plex Media Scanner Analysis.1.log:Nov 24, 2020 02:02:12.124 [0x7ffb65b267c0] ERROR - Format [JPEG] - Not a JPEG file: starts with 0x00 0x00
Plex Media Scanner Analysis.1.log:Nov 24, 2020 02:02:12.124 [0x7ffb65b267c0] ERROR - Failed to successfully analyze part 40178.
Plex Media Scanner Analysis.1.log:Nov 24, 2020 02:02:12.145 [0x7ffb65b267c0] ERROR - Format [JPEG] - Not a JPEG file: starts with 0x00 0x00
Plex Media Scanner Analysis.1.log:Nov 24, 2020 02:02:12.145 [0x7ffb65b267c0] ERROR - Failed to successfully analyze part 35080.
Plex Media Scanner Analysis.1.log:Nov 24, 2020 02:02:12.787 [0x7ffb65b267c0] ERROR - [FFMPEG] - moov atom not found
Plex Media Scanner Analysis.1.log:Nov 24, 2020 02:02:12.787 [0x7ffb65b267c0] ERROR - Exception analyzing media file '/media/video/Home/karls_phone/IMG_0297.MOV' (Could not parse /media/video/Home/karls_phone/IMG_0297.MOV (error=-1094995529): Invalid data found when processing input)
Plex Media Scanner Analysis.1.log:Nov 24, 2020 02:02:12.787 [0x7ffb65b267c0] ERROR - Failed to successfully analyze part 56175.
Plex Media Scanner Analysis.1.log:Nov 24, 2020 02:02:13.479 [0x7ffb65b267c0] ERROR - Format [JPEG] - Not a JPEG file: starts with 0xd9 0x09
Plex Media Scanner Analysis.1.log:Nov 24, 2020 02:02:13.479 [0x7ffb65b267c0] ERROR - Failed to successfully analyze part 71199.
Plex Media Scanner Analysis.1.log:Nov 24, 2020 02:02:13.486 [0x7ffb65b267c0] ERROR - Format [JPEG] - Not a JPEG file: starts with 0x2d 0x08
Plex Media Scanner Analysis.1.log:Nov 24, 2020 02:02:13.486 [0x7ffb65b267c0] ERROR - Failed to successfully analyze part 71221.
Plex Media Scanner Analysis.1.log:Nov 24, 2020 02:02:13.495 [0x7ffb65b267c0] ERROR - Format [JPEG] - Not a JPEG file: starts with 0x00 0x00
Plex Media Scanner Analysis.1.log:Nov 24, 2020 02:02:13.495 [0x7ffb65b267c0] ERROR - Failed to successfully analyze part 35066.
Plex Media Scanner Analysis.1.log:Nov 24, 2020 02:02:13.514 [0x7ffb65b267c0] ERROR - Format [JPEG] - Not a JPEG file: starts with 0x00 0x00
Plex Media Scanner Analysis.1.log:Nov 24, 2020 02:02:13.514 [0x7ffb65b267c0] ERROR - Failed to successfully analyze part 40292.
Plex Media Scanner Analysis.1.log:Nov 24, 2020 02:02:13.525 [0x7ffb65b267c0] ERROR - Format [JPEG] - Premature end of JPEG file
Plex Media Scanner Analysis.1.log:Nov 24, 2020 02:02:13.525 [0x7ffb65b267c0] ERROR - Format [JPEG] - JPEG datastream contains no image
Plex Media Scanner Analysis.1.log:Nov 24, 2020 02:02:13.525 [0x7ffb65b267c0] ERROR - Failed to successfully analyze part 40291.
Plex Media Scanner Analysis.2.log:Nov 24, 2020 02:01:47.376 [0x7f3a0497a7c0] ERROR - Format [JPEG] - Not a JPEG file: starts with 0x00 0x00
Plex Media Scanner Analysis.2.log:Nov 24, 2020 02:01:47.376 [0x7f3a0497a7c0] ERROR - Failed to successfully analyze part 35078.
Plex Media Scanner Analysis.2.log:Nov 24, 2020 02:01:47.417 [0x7f3a0497a7c0] ERROR - Format [JPEG] - Not a JPEG file: starts with 0x00 0x00
Plex Media Scanner Analysis.2.log:Nov 24, 2020 02:01:47.417 [0x7f3a0497a7c0] ERROR - Failed to successfully analyze part 40181.
Plex Media Scanner Analysis.2.log:Nov 24, 2020 02:01:47.463 [0x7f3a0497a7c0] ERROR - Format [JPEG] - Not a JPEG file: starts with 0x00 0x00
Plex Media Scanner Analysis.2.log:Nov 24, 2020 02:01:47.463 [0x7f3a0497a7c0] ERROR - Failed to successfully analyze part 35065.
Plex Media Scanner Analysis.2.log:Nov 24, 2020 02:01:47.501 [0x7f3a0497a7c0] ERROR - Format [JPEG] - Not a JPEG file: starts with 0x00 0x00
Plex Media Scanner Analysis.2.log:Nov 24, 2020 02:01:47.501 [0x7f3a0497a7c0] ERROR - Failed to successfully analyze part 40293.
Plex Media Scanner Analysis.2.log:Nov 24, 2020 02:01:47.524 [0x7f3a0497a7c0] ERROR - Format [JPEG] - Not a JPEG file: starts with 0x00 0x00
Plex Media Scanner Analysis.2.log:Nov 24, 2020 02:01:47.524 [0x7f3a0497a7c0] ERROR - Failed to successfully analyze part 40283.
Plex Media Scanner Analysis.2.log:Nov 24, 2020 02:01:47.553 [0x7f3a0497a7c0] ERROR - Format [JPEG] - Not a JPEG file: starts with 0x00 0x00
Plex Media Scanner Analysis.2.log:Nov 24, 2020 02:01:47.553 [0x7f3a0497a7c0] ERROR - Failed to successfully analyze part 40312.
Plex Media Scanner Analysis.2.log:Nov 24, 2020 02:01:47.575 [0x7f3a0497a7c0] ERROR - Format [JPEG] - Not a JPEG file: starts with 0x00 0x00
Plex Media Scanner Analysis.2.log:Nov 24, 2020 02:01:47.575 [0x7f3a0497a7c0] ERROR - Failed to successfully analyze part 35070.
Plex Media Scanner Analysis.2.log:Nov 24, 2020 02:01:47.587 [0x7f3a0497a7c0] ERROR - Format [JPEG] - Not a JPEG file: starts with 0x02 0x09
Plex Media Scanner Analysis.2.log:Nov 24, 2020 02:01:47.587 [0x7f3a0497a7c0] ERROR - Failed to successfully analyze part 71220.
Plex Media Scanner Analysis.2.log:Nov 24, 2020 02:01:47.614 [0x7f3a0497a7c0] ERROR - Format [JPEG] - Not a JPEG file: starts with 0x00 0x00
Plex Media Scanner Analysis.2.log:Nov 24, 2020 02:01:47.614 [0x7f3a0497a7c0] ERROR - Failed to successfully analyze part 40180.
Plex Media Scanner Analysis.2.log:Nov 24, 2020 02:01:47.640 [0x7f3a0497a7c0] ERROR - Format [JPEG] - Not a JPEG file: starts with 0x00 0x00
Plex Media Scanner Analysis.2.log:Nov 24, 2020 02:01:47.640 [0x7f3a0497a7c0] ERROR - Failed to successfully analyze part 40179.
Plex Media Scanner Analysis.log:Nov 24, 2020 02:02:25.218 [0x7f82d886c7c0] ERROR - Format [JPEG] - Not a JPEG file: starts with 0x00 0x00
Plex Media Scanner Analysis.log:Nov 24, 2020 02:02:25.218 [0x7f82d886c7c0] ERROR - Failed to successfully analyze part 40177.
Plex Media Scanner Analysis.log:Nov 24, 2020 02:02:25.240 [0x7f82d886c7c0] ERROR - Format [JPEG] - Not a JPEG file: starts with 0xf7 0x76
Plex Media Scanner Analysis.log:Nov 24, 2020 02:02:25.240 [0x7f82d886c7c0] ERROR - Failed to successfully analyze part 71197.
Plex Media Scanner Analysis.log:Nov 24, 2020 02:02:25.262 [0x7f82d886c7c0] ERROR - Format [JPEG] - Not a JPEG file: starts with 0xf4 0x8a
Plex Media Scanner Analysis.log:Nov 24, 2020 02:02:25.262 [0x7f82d886c7c0] ERROR - Failed to successfully analyze part 71198.
Plex Media Scanner Analysis.log:Nov 24, 2020 02:02:25.278 [0x7f82d886c7c0] ERROR - Format [JPEG] - Not a JPEG file: starts with 0x00 0x00
Plex Media Scanner Analysis.log:Nov 24, 2020 02:02:25.278 [0x7f82d886c7c0] ERROR - Failed to successfully analyze part 40285.
Plex Media Scanner Analysis.log:Nov 24, 2020 02:02:25.300 [0x7f82d886c7c0] ERROR - Format [JPEG] - Not a JPEG file: starts with 0x00 0x00
Plex Media Scanner Analysis.log:Nov 24, 2020 02:02:25.300 [0x7f82d886c7c0] ERROR - Failed to successfully analyze part 35064.
Plex Media Scanner Analysis.log:Nov 24, 2020 02:02:25.347 [0x7f82d886c7c0] ERROR - Format [JPEG] - Not a JPEG file: starts with 0x44 0x17
Plex Media Scanner Analysis.log:Nov 24, 2020 02:02:25.347 [0x7f82d886c7c0] ERROR - Failed to successfully analyze part 71223.
Plex Media Scanner Analysis.log:Nov 24, 2020 02:02:25.383 [0x7f82d886c7c0] ERROR - Format [JPEG] - Not a JPEG file: starts with 0x00 0x00
Plex Media Scanner Analysis.log:Nov 24, 2020 02:02:25.383 [0x7f82d886c7c0] ERROR - Failed to successfully analyze part 40277.
Plex Media Scanner Analysis.log:Nov 24, 2020 02:02:25.421 [0x7f82d886c7c0] ERROR - [FFMPEG] - moov atom not found
Plex Media Scanner Analysis.log:Nov 24, 2020 02:02:25.421 [0x7f82d886c7c0] ERROR - Exception analyzing media file '/media/video/Home/karls_phone/IMG_5172.MOV' (Could not parse /media/video/Home/karls_phone/IMG_5172.MOV (error=-1094995529): Invalid data found when processing input)
Plex Media Scanner Analysis.log:Nov 24, 2020 02:02:25.421 [0x7f82d886c7c0] ERROR - Failed to successfully analyze part 56322.
Plex Media Scanner Deep Analysis.1.log:Nov 24, 2020 02:01:13.941 [0x7f55b9f2e7c0] ERROR - [FFMPEG] - moov atom not found
Plex Media Scanner Deep Analysis.1.log:Nov 24, 2020 02:01:13.941 [0x7f55b9f2e7c0] ERROR - Exception analyzing media file '/media/video/Home/karls_phone/IMG_5172.MOV' (Could not parse /media/video/Home/karls_phone/IMG_5172.MOV (error=-1094995529): Invalid data found when processing input)
Plex Media Scanner Deep Analysis.log:Nov 24, 2020 02:01:14.219 [0x7f1a58d9a7c0] ERROR - [FFMPEG] - moov atom not found
Binary file Plex Media Server.log matches
[chuck@lizum user.504]$ 

Locale is already set properly:

$ localectl status
System Locale: LANG=en_US.UTF-8
VC Keymap: us
X11 Layout: us

I never bothered to look at that log to find bad media, those are from a different library entirely. I can clean those up.

Most media plays without issue, except the ones I noted initially - the ones that cause the transcoder to go crazy with RAM.

Let’s try this.

  1. Go to https://jell.yfish.us/
  2. Download a whole bunch of their samples into a directory
  3. Make it an “Other Videos” type.
  4. Once PMS has indexed them all.
  5. Restart
  6. Play them, in turn, keeping an eye on RAM utilization.
  7. Report any anomalies

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