Troubleshoot FabricInternalServerError or ServiceAllocationFailure when deploying a Cloud service (classic) to Azure
Important
Cloud Services (classic) is now deprecated for all customers as of September 1st, 2024. Any existing running deployments will be stopped and shut down by Microsoft and the data will be permanantly lost starting October 2024. New deployments should use the new Azure Resource Manager based deployment model Azure Cloud Services (extended support).
In this article, you troubleshoot allocation failures where the fabric controller can't allocate when deploying an Azure Cloud service (classic).
When you deploy instances to a Cloud Service or add new web or worker role instances, 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
In Azure portal, navigate to your Cloud service (classic) and in the sidebar select Operation log (classic) to view the logs.
When you inspect the logs of your Cloud service (classic), you see the following exception:
Exception | Error Message |
---|---|
FabricInternalServerError | Operation failed with error code 'InternalError' and errorMessage 'The server encountered an internal error. Please retry the request.'. |
ServiceAllocationFailure | Operation failed with error code 'InternalError' and errorMessage 'The server encountered an internal error. Please retry the request.'. |
Cause
FabricInternalServerError and ServiceAllocationFailure are exceptions that can occur when the fabric controller fails to allocate instances in the cluster. The root cause varies if the cloud service is pinned or not pinned.
- Not Pinned: Failures from a first deployment of a new cloud service
- Pinned: Failures from existing cloud services
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 this resource pool may become fully utilized. If a cloud service makes an allocation request for additional resources when insufficient resources are available in the pinned resource pool, 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 is unselected, so the cloud service isn't pinned. Azure may have a deployment failure because:
- You 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.
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.
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) 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.
Deploy the workload to a new Cloud service (classic).
- See the How to create and deploy a Cloud service (classic) guide for further instructions.
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.
Update the CNAME or A record to point traffic to the new Cloud service (classic).
- See the Configuring a custom domain name for an Azure Cloud service (classic) guide for further instructions.
Once zero traffic is going to the old site, you can delete the old Cloud service (classic).
- See the Delete deployments and a Cloud service (classic) guide for further instructions.
- To see the network traffic in your Cloud service (classic), see the Introduction to Cloud service (classic) monitoring.
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 the Microsoft Developer Network (MSDN) and Stack Overflow. You can post your issue in these forums, or post to @AzureSupport on X. You also can submit an Azure support request. To submit a support request, on the Azure support page, select Get support.