Failures to restore from Azure artifacts feeds due to throttling
See original GitHub issueWe have started seeing some throttling errors when attempting to restore NuGet packages from Azure Artifacts that manifest like this:
/root/coresetup/.dotnet/sdk/3.0.100/NuGet.targets(123,5): error : Failed to download package 'transport.runtime.linux-musl-x64.Microsoft.NETCore.Jit.3.1.0-preview1.19504.3' from 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9c2ea29a-00e0-4bae-b470-161fdab1f360/nuget/v3/flat2/transport.runtime.linux-musl-x64.microsoft.netcore.jit/3.1.0-preview1.19504.3/transport.runtime.linux-musl-x64.microsoft.netcore.jit.3.1.0-preview1.19504.3.nupkg'.
/root/coresetup/.dotnet/sdk/3.0.100/NuGet.targets(123,5): error : Response status code does not indicate success: 429 (Request was blocked due to exceeding usage of resource 'Concurrency' in namespace 'IPAddress'. For more information on why your request was blocked, see the topic "Rate limits" on the Microsoft Web site (https://go.microsoft.com/fwlink/?LinkId=823950). (DevOps Activity ID: 5B41D91F-6ED5-41D1-814B-0328F8821422)).
##[error]/root/coresetup/.dotnet/sdk/3.0.100/NuGet.targets(123,5): error : Failed to download package 'transport.runtime.linux-musl-x64.Microsoft.NETCore.Jit.3.1.0-preview1.19504.3' from 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9c2ea29a-00e0-4bae-b470-161fdab1f360/nuget/v3/flat2/transport.runtime.linux-musl-x64.microsoft.netcore.jit/3.1.0-preview1.19504.3/transport.runtime.linux-musl-x64.microsoft.netcore.jit.3.1.0-preview1.19504.3.nupkg'.
This does not appear to be causing widespread failures so far, but as we increase our reliance on these feeds, we’re starting to get more reports.
Example builds where this has been seen: https://dev.azure.com/dnceng/public/_build/results?buildId=398862 https://dnceng.visualstudio.com/internal/_build/results?buildId=384184
All unauthenticated NuGet requests are getting thrown into the same throttling bucket by AzDO, and due to the multi-feed lookup for each package that NuGet does, depending on how many feeds you have in your NuGet config, and how many packages you need to restore, the problem gets worse.
The short term suggestions from the AzDO team are:
- Reduce the number of feeds used (Their docs mention we should only be using a single feed for restores)
- Use private feeds instead of public, that way NuGet won’t make unauthenticated requests
- Change NuGet.config to limit the maxHttpRequestsPerSource:
<config>
<add key='maxHttpRequestsPerSource' value='2' />
</config>
We are still in talks with the AzDO team as these workarounds will end up requiring a lot of changes to our infrastructure for this.
Issue Analytics
- State:
- Created 4 years ago
- Comments:19 (18 by maintainers)
Ok - AzDO is saying they’ve fixed it (for real) now.
The new limits seem to have stuck. Haven’t seen any more throttling during restore since the limits were raised. I’ll remove this from FR.
The AzDO team said they are evaluating more sustainable options to handle our load. I’ll keep this open because I think if we onboarded another big repo to only using azdo feeds, we’d start seeing this again.