Jump to content

Recently my Plex server has started acting weird: Some 4k HDR HEVC files with TrueHD streams simply refuse to play 99% of the time and if they do any 'seeking trigger' like resume, fast-forward, rewind or toggling subtitles will result in a stuck loading screen which will eventually result in "Unable to playback media" and a

DEBUG - Failed to stream media, client probably disconnected after X bytes: 104 - Connection reset by peer

in the logs.

 

The server runs Unraid 6.8..3 and I have now localised it to apparently a specific disk in the array. A small sample test seems to confirm that. Movies on other disks play fine, but the tested ones that reside on the disk in question show the same stuck-loading behaviour. Switching to a lower-bandwidth audio stream in the file immediately fixes it however and switching back to high-res audio breaks it again and triggers a warning about the connection to the server not being fast enough. The latter I doubt, as it is connected over gigabit.

 

Now the one thing that makes this disk stand out is that it is highly fragmented compared to the rest:

root@<server>:~# xfs_db -r -c frag <disk>
actual 2288, ideal 1336, fragmentation factor 41.61%
Note, this number is largely meaningless.
Files on this filesystem average 1.71 extents per file

all the other disks are between 5 and 10%.

 

I'm not that intimately familiar with file systems other than NTFS, so my question is: can/will such a high fragmentation cause these kind of issues and should I maybe put a defrag in a cron job or something to once in a while defrag stuff?

Crystal: CPU: i7 7700K | Motherboard: Asus ROG Strix Z270F | RAM: GSkill 16 GB@3200MHz | GPU: Nvidia GTX 1080 Ti FE | Case: Corsair Crystal 570X (black) | PSU: EVGA Supernova G2 1000W | Monitor: Asus VG248QE 24"

Laptop: Dell XPS 13 9370 | CPU: i5 10510U | RAM: 16 GB

Server: CPU: i5 4690k | RAM: 16 GB | Case: Corsair Graphite 760T White | Storage: 19 TB

Link to post
Share on other sites

Well I let it run over the day and can confirm that it didn't help. Debugging continues... In hindsight as well, fragmentation is fragmentation and I just misinterpreted the hearsay of these filesystems being more resistant against fragmentation to think that fragmentation would be more of a bad thing for them.

Crystal: CPU: i7 7700K | Motherboard: Asus ROG Strix Z270F | RAM: GSkill 16 GB@3200MHz | GPU: Nvidia GTX 1080 Ti FE | Case: Corsair Crystal 570X (black) | PSU: EVGA Supernova G2 1000W | Monitor: Asus VG248QE 24"

Laptop: Dell XPS 13 9370 | CPU: i5 10510U | RAM: 16 GB

Server: CPU: i5 4690k | RAM: 16 GB | Case: Corsair Graphite 760T White | Storage: 19 TB

Link to post
Share on other sites

I dont think it would be a disk issue. If its working when you switch the transcoder to a lower quality that seems more Plex specific. 

Consider the file still needs to be read in its original bitrate in order to transcode it. So if the disk can keep up for transcoding, its the same as Direct Stream as far as the drive is concerned. 

 

Spoiler

Desktop: Ryzen9 5950X | ASUS ROG Crosshair VIII Hero (Wifi) | EVGA RTX 3080Ti FTW3 | 32GB (2x16GB) Corsair Dominator Platinum RGB Pro 3600Mhz | EKWB EK-AIO 360D-RGB | EKWB EK-Vardar RGB Fans | 1TB Samsung 980 Pro, 4TB Samsung 980 Pro | Corsair 5000D Airflow | Corsair HX850 Platinum PSU | Asus ROG 42" OLED PG42UQ + LG 32" 32GK850G Monitor | Roccat Vulcan TKL Pro Keyboard | Logitech G Pro X Superlight  | MicroLab Solo 7C Speakers | Audio-Technica ATH-M50xBT2 LE Headphones | TC-Helicon GoXLR | Audio-Technica AT2035 | LTT Desk Mat | XBOX-X Controller | Windows 11 Pro

 

Spoiler

Server: Fractal Design Define R6 | Ryzen 3950x | ASRock X570 Taichi | Asus RTX 4060 Dual OC | 64GB (4x16GB) Corsair Vengeance LPX 3000Mhz | Corsair RM850v2 PSU | Fractal S36 Triple AIO + 4 Additional Venturi 120mm Fans | 8 x 20TB Seagate Exos X22 | 4 x 16TB Seagate Exos X18 | 3 x 2TB Samsung 970 Evo Plus NVMe | LSI 9211-8i HBA

 

Spoiler

NAS: Innovision 4U 24-bay chassis (12GB MiniHD SGIO Backplane) | Intel Core i9-10980xe | EVGA X299 FTW-K | EVGA RTX 2080Ti Super FTW3 | 128GB (8x16GB) Corsair Vengeance LPX 3200Mhz | DEEPCOOL PN1000M PSU| Noctua NH-D12L Chromax Black | 16 x 16TB Seagate Exos X18 | 2 x 2TB Samsung 990 Pro | 2 x 2TB Intel U.2 P4510 | LSI 9305-24i HBA

 

Link to post
Share on other sites

1 hour ago, Jarsky said:

I dont think it would be a disk issue. If its working when you switch the transcoder to a lower quality that seems more Plex specific. 

Consider the file still needs to be read in its original bitrate in order to transcode it. So if the disk can keep up for transcoding, its the same as Direct Stream as far as the drive is concerned. 

 

Yeah it could well be a Plex issue. It's not hard to find complaints about HEVC content not behaving well on it with a variety of circumstance. Note that nothing is (or should be at least) transcoding. My equipment is capable of Direct Playing all my content. The weird thing is that it's specifically TrueHD streams on that disk. The same type of files (i.e. HEVC 4k HDR TrueHD) on other disks play just fine, DTS-HD MA files on the weird disk play just fine and any other lower bitrate audio also plays just fine.

 

Anything I could check on the drive? SMART status doesn't report anything unusual and it's the same drive as the rest of the array (WD Red 4 TB). I'll try moving one of the offending files to another disk to see if it still acts up or not. Last resort would be nuking the database and let it rebuild from scratch, but I'd rather avoid that if possible.

Crystal: CPU: i7 7700K | Motherboard: Asus ROG Strix Z270F | RAM: GSkill 16 GB@3200MHz | GPU: Nvidia GTX 1080 Ti FE | Case: Corsair Crystal 570X (black) | PSU: EVGA Supernova G2 1000W | Monitor: Asus VG248QE 24"

Laptop: Dell XPS 13 9370 | CPU: i5 10510U | RAM: 16 GB

Server: CPU: i5 4690k | RAM: 16 GB | Case: Corsair Graphite 760T White | Storage: 19 TB

Link to post
Share on other sites

I guess it's just Plex. Kodi happily Direct Plays the content and even the Plex for Kodi plugin works completely fine with Plex reporting Direct Play... It's just Plex itself that refuses to play these files. Shame

Crystal: CPU: i7 7700K | Motherboard: Asus ROG Strix Z270F | RAM: GSkill 16 GB@3200MHz | GPU: Nvidia GTX 1080 Ti FE | Case: Corsair Crystal 570X (black) | PSU: EVGA Supernova G2 1000W | Monitor: Asus VG248QE 24"

Laptop: Dell XPS 13 9370 | CPU: i5 10510U | RAM: 16 GB

Server: CPU: i5 4690k | RAM: 16 GB | Case: Corsair Graphite 760T White | Storage: 19 TB

Link to post
Share on other sites

3 hours ago, tikker said:

I guess it's just Plex. Kodi happily Direct Plays the content and even the Plex for Kodi plugin works completely fine with Plex reporting Direct Play... It's just Plex itself that refuses to play these files. Shame

 

Are we talking about Plex Web? 

I used to constantly have issues, and I still do have long delays with playback starting on some files. I find the Plex App in Windows typically works better. 

 

If you arent fully committed to Plex, I also find Emby just overall performs better and is more responsive. I also like how it doesnt interrupt playback when you enable / switch Subtitles in Emby which is a huge annoyance to me in Plex. 

Spoiler

Desktop: Ryzen9 5950X | ASUS ROG Crosshair VIII Hero (Wifi) | EVGA RTX 3080Ti FTW3 | 32GB (2x16GB) Corsair Dominator Platinum RGB Pro 3600Mhz | EKWB EK-AIO 360D-RGB | EKWB EK-Vardar RGB Fans | 1TB Samsung 980 Pro, 4TB Samsung 980 Pro | Corsair 5000D Airflow | Corsair HX850 Platinum PSU | Asus ROG 42" OLED PG42UQ + LG 32" 32GK850G Monitor | Roccat Vulcan TKL Pro Keyboard | Logitech G Pro X Superlight  | MicroLab Solo 7C Speakers | Audio-Technica ATH-M50xBT2 LE Headphones | TC-Helicon GoXLR | Audio-Technica AT2035 | LTT Desk Mat | XBOX-X Controller | Windows 11 Pro

 

Spoiler

Server: Fractal Design Define R6 | Ryzen 3950x | ASRock X570 Taichi | Asus RTX 4060 Dual OC | 64GB (4x16GB) Corsair Vengeance LPX 3000Mhz | Corsair RM850v2 PSU | Fractal S36 Triple AIO + 4 Additional Venturi 120mm Fans | 8 x 20TB Seagate Exos X22 | 4 x 16TB Seagate Exos X18 | 3 x 2TB Samsung 970 Evo Plus NVMe | LSI 9211-8i HBA

 

Spoiler

NAS: Innovision 4U 24-bay chassis (12GB MiniHD SGIO Backplane) | Intel Core i9-10980xe | EVGA X299 FTW-K | EVGA RTX 2080Ti Super FTW3 | 128GB (8x16GB) Corsair Vengeance LPX 3200Mhz | DEEPCOOL PN1000M PSU| Noctua NH-D12L Chromax Black | 16 x 16TB Seagate Exos X18 | 2 x 2TB Samsung 990 Pro | 2 x 2TB Intel U.2 P4510 | LSI 9305-24i HBA

 

Link to post
Share on other sites

9 hours ago, Jarsky said:

 

Are we talking about Plex Web? 

I used to constantly have issues, and I still do have long delays with playback starting on some files. I find the Plex App in Windows typically works better. 

 

If you arent fully committed to Plex, I also find Emby just overall performs better and is more responsive. I also like how it doesnt interrupt playback when you enable / switch Subtitles in Emby which is a huge annoyance to me in Plex. 

Nah the client on an Nvidia Shield connected to an AVR and OLED TV. I've tried all of Emby, Jellyfin, Kodi, Plex and despite them all having their faults I do prefer Plex for look and feel in the end.

 

It took a bit of digging, but in the end it did indeed turn out to be Plex. They updated their demuxer which apparently broke a bunch of things for many people. Installing the beta app that had a supposed fix resolved it.

Crystal: CPU: i7 7700K | Motherboard: Asus ROG Strix Z270F | RAM: GSkill 16 GB@3200MHz | GPU: Nvidia GTX 1080 Ti FE | Case: Corsair Crystal 570X (black) | PSU: EVGA Supernova G2 1000W | Monitor: Asus VG248QE 24"

Laptop: Dell XPS 13 9370 | CPU: i5 10510U | RAM: 16 GB

Server: CPU: i5 4690k | RAM: 16 GB | Case: Corsair Graphite 760T White | Storage: 19 TB

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×