Hello, @SwarupKumarSapireddy-8219 !
Why is the status of my Azure Cloud Services (classic) instance stuck on recycling?
There are a couple known issues that will cause this:
https://learn.microsoft.com/en-us/azure/cloud-services/cloud-services-troubleshoot-common-issues-which-cause-roles-recycle
- Missing runtime dependencies: If a role in your application relies on any assembly that is not part of the .NET Framework or the Azure managed library, you must explicitly include that assembly in the application package.
- Assembly targets wrong platform: Azure is a 64-bit environment so .NET assemblies compiled for a 32-bit target won't work on Azure.
- Role throws unhandled exceptions while initializing or stopping: Any exceptions that are thrown by the methods of the RoleEntryPoint class, which includes the OnStart, OnStop, and Run methods cause the role to recycle and may be thrown on each attempt to start.
- Role returns from Run method: The Run method is intended to run indefinitely. If your code overrides the Run method, it should sleep indefinitely. If the Run method returns, the role recycles.
- Incorrect DiagnosticsConnectionString setting: f application uses Azure Diagnostics, your service configuration file must specify the
DiagnosticsConnectionString
configuration setting.
- Exported certificate does not include private key: To run a web role under TLS, you must ensure that your exported management certificate includes the private key.
Additionally, you may encounter UpdateDeploymentRoleRecycleThresholdReached exceptions that occur during deployment. If your service role instances have continuously recycled during an update or upgrade, then the update or upgrade with your configuration settings prevent the role instances from running:
https://learn.microsoft.com/en-us/troubleshoot/azure/cloud-services/troubleshoot-role-recycle-swap
To resolve this issue, take one of the following steps:
Delete the deployment slot from which the roles are recycling. Then do a new deployment to an empty slot.
Create a new cloud service instance, deploy it, and update the service's canonical name (CName).
What if you don't want to lose the IP address that's associated with your existing deployment slot? Then follow these steps to reserve and release the address. For more information, see Reserved IP addresses for Cloud Services & Virtual Machines.
- Reserve the IP address of the existing deployment slot.
- Release the associated reserved IP address.
- Delete the deployment slot.
- Make a new deployment to that slot.
- Associate the required reserved IP address to this cloud service slot.
If you've gone through all of these steps and are still running into issues, please let us know in the comments and we will continue to troubleshoot this.
I hope this has been helpful! Your feedback is important so please take a moment to accept answers.
If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!