Closed dartigen closed 6 years ago
That's a youtube-dl issue, but in some degree youtube-dl-gui is also responsible for the error due to the multithreading.
On the youtube-dl's side, in file YoutubeDL.py#L2198 they never close down the open socket hence leaking sockets, which in turn results to TCP/IP ports exhaustion.
Under normal circumstances this should not be a problem since Windows allocate ports 1025 -> 5000 for client usage (according to this), but for some reason on your system all ports are exhausted (too many videos downloading? or too many apps that use sockets?).
What you can do:
If you have changed the workers_number in your youtube-dl-gui's settings file to some value like 100+ use a smaller value (default is 3).
I'll refer it over to youtube-dl and see what they can do.
I'm not sure if there's a way to check how many or what applications are using connections, but it did happen more often when I had stuff like Google Drive Sync running alongside it, yeah. I did find it very strange though that it still sometimes happened when I only had one video downloading though - I guess that was the other applications getting in the way.
Thanks for clearing that up!
EDIT: I just checked settings.json, and workers_number is at the default 3 - so I've turned it down to 1 to see if that fixes it until I can figure out what's eating all the ports.
What is the purpose of your issue?
[X] Bug report
Full log output from one instance of this (it took a while for it to happen):
What operating system do you use ? Windows 10
List of actions to perform to reproduce the problem:
What is the expected behaviour ?
The video file should download in full, and once finished the Status should read 'Completed'.
What happens instead ?
The video file downloads, but that Status reads 'Warning'.
Or, the video file doesn't download at all (sometimes a .part file is found in the output directory), and the Status reads 'Error'. (Reattempting the download works, but the Status then reads 'Already Downloaded'.
I've only started to experience this recently (as of about November 2017), but I have experienced it on multiple devices (two PCs, as well as a laptop, all running Windows 10). One of the PCs was on a very, very good connection, and the laptop has moved from that network to less-good connections, which makes me think it's not network-related.
From some Googling, this seems to be an issue with Python multithreading and network connections (based on this thread and a few others: https://stackoverflow.com/questions/23596009/python-server-client-program-error-oserror-winerror-10048 ). I'm not sure if that would be part of youtube-dlg or youtube-dl though.
I'm not sure how to fix it, other than maybe installing Python independently of youtube-dlg, or reinstalling youtube-dlg. I couldn't find anything else about it in the issues tracker about that error message specifically.