-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Parallel downloads with TransferManager easily starve the executor's thread pool (1.11.44) #896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Are you using default thread pool provided by SDK or custom? If custom thread pool, what is the number of threads in it? Are you seeing this behavior frequently? Can you explain you download scenario like what is size of the file to download, downloading single/multiple files? I am trying to figure out the case where dead lock can happen. |
I tried it both with a custom thread pool (8 threads) and the default one that the SDK provides. The code I have is trying to download 69 files, totaling to about 16 GiB, with the same My code, as it happens, has some metrics around the transfers. First I get these warnings, which I don't know if they're relevant:
Then the download proper starts. It downloads for a few seconds (as seen from the OS X system monitor's network graph), but it hangs very soon thereafer. So my metrics reporter just repeatedly logs this out, showing the TransferManager stuck after 8 transfers have started (same as the number of threads in the custom executor) and only 4 have completed. (I compute these metrics by attaching
To me it looks like the following is happening, if I understand things right:
So with 69 downloads and an executor with only 8 (or the default 10) threads, it's just very easy for the program to end up in a state where all of the executor's 8 threads are running Solutions I might suggest (which may well be all wrong):
|
@ldcasillas-progreso In the meantime, you can disable parallel downloads by setting this option to true. |
This bug is fixed in v1.11.47. See release notes here. Thanks for reporting this issue. |
Thanks. I'll test it out tomorrow. |
With the parallel downloads feature in 1.11.x, it's very easy to deadlock the
TransferManager
's executor's thread pool by simply submitting a lot of download requests. All of the executor's threads end up in this sort of state:...and none of the executor's threads is actually downloading anything. Presumably the combineFiles task should be a non-blocking future of some sort.
The text was updated successfully, but these errors were encountered: