Bump! Curious if progress has been made on a stable fix for the curl issue? Any potential timelines? New PMS builds to test?
I’d love to update and start using some of the new features!
Bump! Curious if progress has been made on a stable fix for the curl issue? Any potential timelines? New PMS builds to test?
I’d love to update and start using some of the new features!
You can track the curl issue here https://github.com/curl/curl/pull/5634
Once the curl fix is out in an official release then we would bring it into Plex Media Server
Out of curiosity, and recognizing the limitations of my knowledge at this level of networking, would increasing the number of available ports as mentioned in the following: Plex Library Scans Initiate Hundreds of TCP_WAIT Sessions using up all available ports? - #4 by Wile_E be a viable temporary solution until an updated curl is released?
Please forgive my misinterpretation if this doesn’t apply.
Even with the curl fix which would reduce the number of dynamic tcp ports used by 66%, we are still having tcp port exhaustion for large TV libraries.
The Movies library scanning got changed recently to be in-line so there would be much less use of dynamic ports. TV Shows is the next library type that will migrate to in-line scanning - development work is only just starting on that.
So the answer is yes, even with the curl fix we will still need some tcp parameter tweaking in windows - whilst we have separate scanning process for TV libraries and for users with large libraries.
The two actions would be
edit: I just noticed you already covered both of these things in a post above that I somehow missed in my skimming, sorry to make you repeat yourself.
It this the correct way to construct the reg entry for reducing the time wait?
Yes - that is correct. Reduce it to decimal value 30
This is the Microsoft official documentation
For doubling the size of the tcp dynamic ports - set it to start at 32678 with size of 32678
NetSh INT IPV4 SET DynamicPort TCP Start=32768 num=32768
NetSh INT IPV6 SET DynamicPort TCP Start=32768 num=32768
Making these changes together with the curl change would probably resolve the issue for large TV libraries until there is a new in-line scanner. The changes on their own without the curl fix would also help
I’m happy to report that after upping the ephemeral ports and reducing the wait times my Roku users are reporting that they are no longer getting booted repeatedly.
Thanks for all the help, and I will be monitoring the github on curl.
Cheers!
@sa2000 thanks for the updates in this thread, they’ve been very helpful. I was unaware of the GitHub page tracking the curl update, and I will continue to monitor the work there. Looks like they have a potential fix. Fingers crossed!
@MariusMS did you update to any beta builds, or just make the registry change for the TCP timeout and run the netsh commands?
Thanks!
I am not on the beta track, just accepting the release dates as they are offered by the web interface.
Thanks @MariusMS.
I added the registry entry for TcpTimedWaitDelay, ran both netsh commands that @sa2000 posted, rebooted, and updated to PMS 1.20.1.3232.
So far, so good. I’ve had a couple Rokus streaming all day without an issue. Will continue to monitor. Hope it continues to hold up! Thanks!
I have this issue as well but, I had experienced very good results with the TcpTimedWaitDelay update until something changed recently that made it start erroring again.
Now, once again, any time it does a library scan (movies or TV, but especially on TV) all of my viewers get a “playback has been stopped due to multiple playback errors”. The issue goes away as soon as the library scan is completed. Since new shows are being added throughout the evening, this tends to happen quite regularly in my busiest viewer periods which are also in the evening.
I wouldn’t mind if the library scan took longer, but I’d rather not have it only scanning one time every day. Is there any way to tell the library scan to use less ports or to limit the ports it’s allowed to use?
I’m glad I finally found this thread. I’ve been having the exact errors listed for the last week and could only find the Malwarebytes fix, but I wasn’t running that.
I can replicate the transcoder crash by manually requesting a library rescan while watching a file that is transcoding. I’ve done all of the available updates to Plex, Windows, and Intel Graphics drivers.
For now I’ll set the auto library scan to just daily. Are there any logs/data you would like me to provide? I have multiple of the plex logs but no netstats.
Edit: For what it’s worth, I have 5900 episodes and about 800 movies on separate hard drives.
I do not need any more logs.
The clue is this -138 error in the Plex Media Server logs
[Transcoder] [tcp @ xxxxxxxxx] Connection to tcp://127.0.0.1:32400 failed: Error number -138 occurred
The movies libraries can be upgraded to the new in-line Movies Scanner and should therefore not cause an issue with the port usage for scanning
The TV Shows is still scanning in a separate process and so remains a problem
A curl update to be incorporated into Plex Media Server will reduce port usage by 66% whilst scanning which should help and will resolve the issue for some users. For others and until that fix is out, may need to split the TV Shows library and increase the dynamic ports and reduce time_wait
See my post earlier today which links to another
I’m chronically experiencing this issue about 10-20 minutes each time playing something. Any update on a fix? I’m running 1.21.1.3876.Plex Media Server Logs_2021-01-23_11-16-51.zip (5.8 MB)
The curl fix is not out yet in Plex Media Server. That fix would reduce the port usage by 66% from the dynamic pool
In your logs the issue arose during scanning of the Music Library
The changes to the scanning and agents that has been rolled out in the past year should be reducing the chances of this arising. The issue arises when the Plex Media Server process and Plex Media Scanner process communicate with each other. Scanning has been changed for Photos and Music and Movies so that a separate process is not used for scans. If you upgrade the Music Library to use the new scanner then this should be avoided - similarly upgrading the movies libraries
In Plex Web select the library and open up the actions list and select upgrade
Work is currently in progress to introduce this new in-line scanner for TV Shows libraries as well
Thanks a ton sa2000! This update has helped significantly… I look forward to the updated curl fix!
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.