Skip to content

Increase request timeout to match default retry attempts. #1018

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

Merged
merged 5 commits into from
Jan 20, 2022

Conversation

peombwa
Copy link
Member

@peombwa peombwa commented Jan 19, 2022

This PR proposes:

  • Increases the default HTTP client timeout to 300 seconds. This works out to 100 seconds per retry attempt. Our default max retry-attempt is fixed at 3. Closes Increase HTTP Request Timeout #1013.
  • Adds -ClientTimeout parameter to Connect-MgGraph. This parameter allows customers to configure an HTTP client timeout when throttled requests respond with a retry-after header > the client's default of 300 seconds.
  • Fixes bug in Invoke-MgGraphRequest that made it not throw exceptions on error in certain conditions. Closes Invoke-MgGraphRequest Should Always Throw on Error #1014.

Tests

  1. Using default timeout of 300 seconds.
    image

  2. Using a timeout of 10 seconds.
    image

Related to timeouts being experienced by customers when running https://docs.microsoft.com/en-us/troubleshoot/azure/active-directory/enable-support-tls-environment?tabs=powershell#overview-of-new-telemetry-in-the-sign-in-logs.

@georgend georgend merged commit 2879b49 into dev Jan 20, 2022
@peombwa peombwa mentioned this pull request Jan 20, 2022
@peombwa peombwa deleted the bugFixes/IncreaseRequestTimeout branch January 25, 2022 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invoke-MgGraphRequest Should Always Throw on Error Increase HTTP Request Timeout
2 participants