ERROR - Caught exception trying to stream file: ... Write: Protocol is shutdown

While looking at my plex media server.log for another reason, every minute or so i see one or more of the below error’s. Everything is playing fine so far, but wanted to see if anyone had any insight they could share on this error and how to get rid of it.

Dec 16, 2016 08:52:48.215 [8092] ERROR - Caught exception trying to stream file: c:\xcode\plex-transcode-5af48bf54c449d86-com-plexapp-android-8cb04690-43e4-425f-a676-0719f240a47d\media-00045.ts: write: protocol is shutdown

Edit 1:
The only thing streaming right now is to an Amazon Fire TV. There is also a paused Roku stream according to the log file.

Edit 2:
Dec 16, 2016 09:05:28.160 [8092] DEBUG - HLS segment range: 4 - 205; average bitrate: 2.12 Mbps (segment size min/avg/max: 0.3/1.3/1.8)
Leads me to believe that it is indeed the Fire TV stream that this error is happening on since the [8092] is the same.
I also found others that i associate with the Fire TV stream (remote user).
Dec 16, 2016 09:07:52.652 [4816] ERROR - Caught exception trying to stream file: c:\xcode\plex-transcode-5af48bf54c449d86-com-plexapp-android-8cb04690-43e4-425f-a676-0719f240a47d\media-00226.ts: write: protocol is shutdown
Dec 16, 2016 09:08:54.810 [7916] ERROR - Caught exception trying to stream file: c:\xcode\plex-transcode-5af48bf54c449d86-com-plexapp-android-8cb04690-43e4-425f-a676-0719f240a47d\media-00240.ts: write: protocol is shutdown
Dec 16, 2016 09:10:03.233 [8092] ERROR - Caught exception trying to stream file: c:\xcode\plex-transcode-5af48bf54c449d86-com-plexapp-android-8cb04690-43e4-425f-a676-0719f240a47d\media-00252.ts: write: protocol is shutdown
Dec 16, 2016 09:11:06.828 [7308] ERROR - Caught exception trying to stream file: c:\xcode\plex-transcode-5af48bf54c449d86-com-plexapp-android-8cb04690-43e4-425f-a676-0719f240a47d\media-00265.ts: write: protocol is shutdown
I’m going to try my local Fire TV and see if it does the same thing.

Edit 3:
Dec 16, 2016 09:20:33.769 [8208] ERROR - Caught exception trying to stream file: c:\xcode\plex-transcode-b489293280e80170-com-plexapp-android-aedadc60-93e6-481f-98a0-a81959cb8183\media-00031.ts: write: protocol is shutdown
Dec 16, 2016 09:21:03.774 [1168] ERROR - Caught exception trying to stream file: c:\xcode\plex-transcode-b489293280e80170-com-plexapp-android-aedadc60-93e6-481f-98a0-a81959cb8183\media-00034.ts: write: protocol is shutdown
Dec 16, 2016 09:21:33.772 [7372] ERROR - Caught exception trying to stream file: c:\xcode\plex-transcode-b489293280e80170-com-plexapp-android-aedadc60-93e6-481f-98a0-a81959cb8183\media-00037.ts: write: protocol is shutdown
Dec 16, 2016 09:22:53.776 [1168] ERROR - Caught exception trying to stream file: c:\xcode\plex-transcode-b489293280e80170-com-plexapp-android-aedadc60-93e6-481f-98a0-a81959cb8183\media-00045.ts: write: protocol is shutdown
I had the remote user stop streaming, confirmed after a few minutes that the error stopped, then started my local hardwired Fire TV streaming at original quality a different show and the error seems to have returned. I also noticed that when i paused my local fire tv playback, the tail i had running on the log file continued to appear to stream, although at a point the netmon no longer showed active streaming traffic. The log continued to post items similar to below.
Dec 16, 2016 09:24:07.272 [7372] DEBUG - Request: [::ffff:127.0.0.1:62373 (Loopback)] PUT /video/:/transcode/session/b489293280e80170-com-plexapp-android/progress?progress=22.7&size=-22&remaining=18730 (10 live) Signed-in Token (jeramie@blahblahblah)
Dec 16, 2016 09:24:07.274 [7372] DEBUG - HLS segment range: 25 - 55; average bitrate: 2.84 Mbps (segment size min/avg/max: 1.5/3.5/6.3)
Dec 16, 2016 09:24:07.274 [7372] DEBUG - We want 3 segments ahead, last returned was 48 and max is 55.
Dec 16, 2016 09:24:07.274 [7372] DEBUG - It took 0.0 sec to serialize a list with 0 elements.
Dec 16, 2016 09:24:07.274 [5236] DEBUG - Completed: [::ffff:127.0.0.1:62373] 206 PUT /video/:/transcode/session/b489293280e80170-com-plexapp-android/progress?progress=22.7&size=-22&remaining=18730 (9 live) 1ms 342 bytes
Dec 16, 2016 09:24:07.789 [6588] DEBUG - Auth: We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Dec 16, 2016 09:24:07.790 [6588] DEBUG - Auth: Came in with the master token, authorization succeeded.
Dec 16, 2016 09:24:07.790 [8208] DEBUG - Request: [::ffff:127.0.0.1:62380 (Loopback)] PUT /video/:/transcode/session/b489293280e80170-com-plexapp-android/progress?progress=22.8&size=-22&remaining=10936 (9 live) Signed-in Token (jeramie@blahblahblah)
Dec 16, 2016 09:24:07.791 [8208] DEBUG - HLS segment range: 25 - 55; average bitrate: 2.84 Mbps (segment size min/avg/max: 1.5/3.5/6.3)
Dec 16, 2016 09:24:07.791 [8208] DEBUG - We want 3 segments ahead, last returned was 48 and max is 55.
Dec 16, 2016 09:24:07.791 [8208] DEBUG - It took 0.0 sec to serialize a list with 0 elements.
Dec 16, 2016 09:24:07.791 [5236] DEBUG - Completed: [::ffff:127.0.0.1:62380] 206 PUT /video/:/transcode/session/b489293280e80170-com-plexapp-android/progress?progress=22.8&size=-22&remaining=10936 (9 live) 1ms 342 bytes
Dec 16, 2016 09:24:08.305 [6588] DEBUG - Auth: We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Dec 16, 2016 09:24:08.305 [6588] DEBUG - Auth: Came in with the master token, authorization succeeded.
Dec 16, 2016 09:24:08.306 [7372] DEBUG - Request: [::ffff:127.0.0.1:62381 (Loopback)] PUT /video/:/transcode/session/b489293280e80170-com-plexapp-android/progress?progress=22.8&size=-22&remaining=11714 (10 live) Signed-in Token (jeramie@blahblahblah)
Dec 16, 2016 09:24:08.307 [7372] DEBUG - HLS segment range: 25 - 55; average bitrate: 2.84 Mbps (segment size min/avg/max: 1.5/3.5/6.3)
Dec 16, 2016 09:24:08.307 [7372] DEBUG - We want 3 segments ahead, last returned was 48 and max is 55.
Dec 16, 2016 09:24:08.307 [7372] DEBUG - It took 0.0 sec to serialize a list with 0 elements.
Dec 16, 2016 09:24:08.307 [5236] DEBUG - Completed: [::ffff:127.0.0.1:62381] 206 PUT /video/:/transcode/session/b489293280e80170-com-plexapp-android/progress?progress=22.8&size=-22&remaining=11714 (10 live) 1ms 342 bytes
The above posted to the logs maybe 1 minute after i paused the Fire TV playback. This continued for a few minutes until i exited back to the plex menu on the fire tv.
It’s also interesting that the original error did not occur while the fire tv playback was paused.
Thanks so much!

It sounds like you have an anti-virus/malware program trying to scan that transcoder folder, so there is a race condition with the program locking the file and PMS trying to use/remove it. Add that transcoder folder to that program’s exception folder so it doesn’t scan files in there.

Sorry for the delay, but yes that appears to have fixed the error. thanks a ton!!