Troubleshoot OverconstrainedAllocationRequest when deploying Cloud services (classic) to Azure

Important

Cloud Services (classic) is now deprecated for new customers and will be retired on August 31st, 2024 for all customers. New deployments should use the new Azure Resource Manager based deployment model Azure Cloud Services (extended support).

In this article, you'll troubleshoot over constrained allocation failures that prevent deployment of Azure Cloud Services (classic).

When you deploy instances to a Cloud Service or add new web or worker role instances, Microsoft Azure allocates compute resources.

You may occasionally receive errors during these operations even before you reach the Azure subscription limit.

Tip

The information may also be useful when you plan the deployment of your services.

Symptom

Image shows the Operation log (classic) blade.

Exception Type Error Message
OverconstrainedAllocationRequest The VM size (or combination of VM sizes) required by this deployment cannot be provisioned due to deployment request constraints. If possible, try relaxing constraints such as virtual network bindings, deploying to a hosted service with no other deployment in it and to a different affinity group or with no affinity group, or try deploying to a different region.

Cause

The root cause varies if the cloud service is pinned or not pinned.

Note

When the first instance is deployed to a cloud service (in either staging or production), that cloud service gets pinned to a cluster.

Over time, the resources in the cluster may become fully utilized. If a Cloud service (classic) makes an allocation request for additional resources when insufficient resources are available in the pinned cluster, the request will result in an allocation failure.

Solution

Follow the guidance for allocation failures in the following scenarios.

Not pinned to a cluster

The first time you deploy a Cloud service (classic), the cluster hasn't been selected yet, so the cloud service isn't pinned. Azure may have a deployment failure because:

  • You've selected a particular size that isn't available in the region.
  • The combination of sizes that are needed across different roles isn't available in the region.

When you experience an allocation error in this scenario, the recommended course of action is to check the available sizes in the region and change the size you previously specified.

  1. You can check the sizes available in a region on the Cloud service (classic) products page.

    Note

    The Products page won't show the available capacity. For any new allocation, Azure should be able to pick the optimal cluster in your region at that point in time.

  2. Update the service definition file for your Cloud service (classic) to specify a different product size from your region.

Pinned to a cluster

Existing cloud services are pinned to a cluster. Any further deployments for the Cloud service (classic) will happen in the same cluster.

When you experience an allocation error in this scenario, the recommended course of action is to redeploy to a new Cloud service (classic) (and update the CNAME).

Tip

This solution is likely to be most successful as it allows the platform to choose from all clusters in that region.

Note

This solution should incur zero downtime.

  1. Deploy the workload to a new Cloud service (classic).

    Warning

    If you do not want to lose the IP address associated with this deployment slot, you can use Solution 3 - Keep the IP address.

  2. Update the CNAME or A record to point traffic to the new Cloud service (classic).

  3. Once zero traffic is going to the old site, you can delete the old Cloud service (classic).

See Troubleshooting Cloud service (classic) allocation failures | Microsoft Docs for further remediation steps.

Next steps

For more allocation failure solutions and background information:

If your Azure issue isn't addressed in this article, visit the Azure forums on MSDN and Stack Overflow. You can post your issue in these forums, or post to @AzureSupport on Twitter. You also can submit an Azure support request. To submit a support request, on the Azure support page, select Get support.