Thank you - very good diagnostics
It looks like a change in the version of curl used within Plex Media Server that is probably the cause. We are now using up all ports after about 4100 movies
I have added your diagnostics to the issue that is open. We are waiting a response to an existing curl issue.
In the meantime - you could consider breaking up your movies library into multiple libraries
Ports appear to start getting reused after 3.5 minutes +