Download requests made in bulk failing

Open
#1,676 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
22/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
node.js, typescript
Domain
api

Research direction

No files or tests are named. Start by reproducing the bulk download flow with the Graph API, Fetch, and Node.js at the reported request sizes, then examine the failed requests and whether retries occur. Done requires an identified cause and a verified resolution for intermittent failures, but the issue does not define an expected fix.

Written by the indexing model from the issue text.

Description

Not sure if this is a code related issue, or a network issue. or node related issue. It is hard to pinpoint any root cause as the data received is variable and inconsistent. When requesting downloads in bulk from the Graph API using Fetch and node JS there appears to be an intermittent problem.

At first it was assumed that node and fetch were struggling with the number of requests being made for example we would run an API request to gather info on 1000 files and for each file request a download using the methods provided by the SDK.

What was initially discovered was that when 2000+ files were requested multiple downloads would fail. For example, only 700 of these files would land on disk. In circumstances where downloads were failing there appear to have been no retry attempts.

The flows were checked for event loop lag and the CPU for excessive usage. Neither were apparent as issues. What was indicated in a error response was that fetch was just failing. It was not receiving a response.

A timer was added to create a space between individual requests, this worked and did mediate well. However, it was also apparent that download requests were failing when smaller amounts of files were requested, for example between 400 and 500. It is conceivable that this should not be a problem for an API to manage.

I am just wondering if other SDK/Graph users have encountered this issue.

Dominant language
TypeScript
Stars
833
Forks
240
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoftgraph/msgraph-sdk-javascript

All issues in microsoftgraph/msgraph-sdk-javascript

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.