Skip to content
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

Multiple filesDownload freezes #1039

Open
amorimfilipe opened this issue Nov 23, 2022 · 5 comments
Open

Multiple filesDownload freezes #1039

amorimfilipe opened this issue Nov 23, 2022 · 5 comments
Labels

Comments

@amorimfilipe
Copy link

Describe the bug
Using multiple filesDownload with Promise.all() freezes.

To Reproduce
Create multiple requests of filesDownload and use Promise.all().

Expected Behavior
Promises should resolve or reject. May be due rate limit but would expect a reject.

Actual Behavior
Promises are never resolved or rejected.

Versions

  • What version of the SDK are you using? 10.34.0
  • What version of the language are you using? Node 18.12.1
  • Are you using Javascript or Typescript? JavaScript

Additional context
Add any other context about the problem here.

@greg-db
Copy link
Contributor

greg-db commented Nov 24, 2022

Thanks for the report. How many is "multiple" when you see this, and can you share some sample code to reproduce it?

@amorimfilipe
Copy link
Author

I have the issue with ~60 requests.

try {
 const files = await dbx.filesListFolder({ path: '/test' })
 const requests = files.map((f) => dbx.filesDownload({ path: f.path_lower }))
 const response = await Promise.all(requests)

 console.log(response)
} catch (err) {
  console.log(err)
}

@greg-db
Copy link
Contributor

greg-db commented Nov 25, 2022

Thanks for the additional information! I just tried this out with the same version of the Dropbox library and node itself (with the slight code modification for my test account of: const files = (await dbx.filesListFolder({ path: '/testing/many' })).result.entries.slice(0, 100)) but this issue doesn't reproduce for me for 100 files. It does successfully return all of the responses.

For reference, if any calls are rejected by a rate limit server-side, the server would respond with a 429 response. I am able to receive that (a 429 with a too_many_requests error in particular) when triggering a very large number of calls (well more than 100).

How big are the files you're trying though? I'm testing with small files, but perhaps the issue is related to the amount of file data.

@amorimfilipe
Copy link
Author

amorimfilipe commented Nov 25, 2022

The files are ~1.5 MB. Until 20 requests it goes fine, only after that the issue happens. If it is fine on your side, I will try to find out. Thanks anyway!

@greg-db
Copy link
Contributor

greg-db commented Nov 27, 2022

Thanks! I can reproduce this issue when I increase the size of the files in my attempt. I'll ask the team to investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants