2

I am using Azure JAVA SDK and am trying to list the Storage Accounts for the subscription. But I am intermittently getting this exception response.

com.microsoft.azure.CloudException: Status code 429, {"error":{"code":"ResourceCollectionRequestsThrottled","message":"Operation 'Microsoft.Storage/storageAccounts/read' failed as server encountered too many requests. Please try after '17' seconds. Tracking Id is 'f13c3318-8fb3-4ae1-85a5-975f4c17a512'."}}

Is there a limit on the number of requests one can make to the Azure resource API ?

user1142317
  • 533
  • 1
  • 8
  • 20

1 Answers1

2

Is there a limit on the number of requests one can make to the Azure resource API ?

Yes. The limits are documented here: https://learn.microsoft.com/en-us/azure/azure-subscription-service-limits (please see Subscription limits - Azure Resource Manager section). And you can see the 429 error code from here.

Based on the documentation, currently you're allowed to make 15000 Read requests/hour for Azure Resource Manager API.

Peter Pan
  • 23,476
  • 4
  • 25
  • 43
Gaurav Mantri
  • 128,066
  • 12
  • 206
  • 241
  • 1
    Surprisingly it just fails while only making a request to get a list of Storage Accounts. – user1142317 Aug 24 '17 at 13:22
  • That is weird. Are you able to perform other ARM operations like list resource groups without any problem? – Gaurav Mantri Aug 24 '17 at 13:30
  • 1
    These are the sequence of events which I do and every time it fails on the second operation while listing the Storage Accounts .Not even once it failed on the first operation. azure.virtualMachines().list(); azure.storageAccounts().list(); – user1142317 Aug 24 '17 at 13:34
  • Honestly I don't know why this is happening. It may be a good idea to post this issue as a comment here: https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits. You will get to hear from product team directly. HTH. – Gaurav Mantri Aug 24 '17 at 15:14
  • 2
    I get the same: Operation 'Microsoft.Storage/storageAccounts/read' failed as server encountered too many requests. Please try after '17' seconds. It's weird that is **'17' seconds always** , my operation is a az storage blob delete, but is not even 15 operations per minute. – nicocesar Nov 15 '17 at 19:20
  • 2
    Storage account management operations have a more strict throttling limit than the overall ARM throttling. For storage account list operations the limit is 100 per 5 minutes. These are documented at https://learn.microsoft.com/en-us/azure/azure-subscription-service-limits#storage-limits under the "Storage account management operations" section – kwill May 22 '18 at 16:31