microsoftgraph / msgraph-sdk-javascript

Microsoft Graph client library for JavaScript
https://graph.microsoft.com
MIT License
729 stars 220 forks source link

Graph API Requests start timing out without any specific observable pattern #1693

Closed arjun-gopikrishnan closed 4 weeks ago

arjun-gopikrishnan commented 1 month ago

Bug Report

Prerequisites

For more information, see the CONTRIBUTING guide.

Description

[Description of the bug or feature]

Console Errors:

Error: connect ETIMEDOUT 2603:1047:1:98::80:443

Stack trace : {"error":{"message":"connect ETIMEDOUT 2603:1047:1:98::80:443","name":"Error","stack":"Error: connect ETIMEDOUT 2603:1047:1:98::80:443\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"headers":{"Accept":"application/json, text/plain, /",

Screenshots: [If applicable, add screenshots to help explain your problem]

Steps to Reproduce

Unable to establish a clear pattern for timeouts. Occasionally starts happening after lot of requests, but no guarantee

Expected behavior: Response status 200

Actual behavior: Response status 500, error message Error: connect ETIMEDOUT 2603:1047:1:98::80:443

Additional Context

Add any other context about the problem here..

Usage Information

Request ID - Value of the requestId field if you are receiving a Graph API error response

SDK Version - "^3.0.2"

Node Version - v18.18.1

Browser Name - [The name of Browser that you are using for SDK]

Version - [The version of the browser you are using]

petrhollayms commented 1 month ago

Hi @arjun-gopikrishnan ,

Could you please confirm that the Graph REST API is available and there are no network issues between you and the Graph endpoint if you start seeing the timeouts? For example, by using curl or otherwise.

Is this error specific to one or several endpoints or does it affect all Graph endpoints?

Could you please share your code how do you connect to Graph and call its endpoints?

arjun-gopikrishnan commented 1 month ago

Hi @petrhollayms ,

We had an open ticket with the Microsoft support team regarding our issue, upon who's recommendation we'd created a bug report here while they were investigating other possible reasons that could've been causing this issue.

The issue was due to some incorrectly configured settings on our Azure App Service. This issue can be closed.