Server Version#: 1.41.4.9399
Player Version#: Multiple affected (Web, iOS, tvOS)
Plex Media Server is crashing due to insufficient disk space during a transcode playback session.
This crash is 100% repeatable.
The symptom of the crash is that the PlexMediaServer/Transcode/Sessions folder is not cleaning up older chunks while the title is playing. My transcode buffer throttle is set to the default of 30 seconds. On a Mac, this folder is located at:
/Users/username/Library/Caches/PlexMediaServer/Transcode/Sessions.
Each transcode session generates a unique folder name, e.g.: plex-transcode-ac4hsknc55qk0npols7crghz-015cfa7c-3ba1-43c9-a86b-c1a2d12c993e.
Each chunk in the transcode session is named something like:
chunk-stream0-00932.m4s (where stream0 = video, stream1 = audio).
Side note: when playing from Plex for iOS, PMS generates filenames like media-04064.ts, combining all streams into a single transport stream chunk (this is closer to how DVR’s behave).
I assumed Plex was only keeping enough transcode chunks to facilitate quick rewind (30-60 seconds). I played a title for at least 15 minutes until the disk space ran out and the application crashed. I did this again at least three more times. Disk space was not reclaimed until the Plex Media Server app was restarted, and the Transcode/Sessions folder was purged on application startup.
As a workaround, I can manually clear the transcode chunks by stopping playback, or seeking behind by more than a minute or so. This triggers PMS to delete the current transcode chunk folder and start a fresh one. Note: I had to seek far enough to cause the buffering ring to appear; 10-20 seconds isn’t enough, because Plex will start playing the chunks cached on disk.
For the developers: the Plex Crash Reporter did activate each time. It collected logs, and as far as I can tell it also sent data to Plex. I have a copy of those logs set aside — they were buried deep in a subdirectory of /var/folders/.