PaaS Cloud Service Role Restart Scenarios


There are several reasons why a PaaS cloud service role instance would restart or recycle.  This list may not be exhaustive, but I believe it covers all scenarios as of today.  Some day when I have free time I will try to edit this blog post to include details about how to detect each of these restarts.

The items at the bottom marked with [VM] will cause a reboot or reimage of the VM itself, while the other items will leave the VM running but cause a restart of the role processes.  For more information about the role processes, see https://blogs.msdn.microsoft.com/kwill/2011/05/05/windows-azure-role-architecture/.

 

  • In place upgrade of the cloud service
  • Config change of the cloud service that changes the environment, such as adding a new certificate that the guest agent has to install
  • Calling RoleEnvironment.RequestRecycle from within the VM
  • Stop/Start management operation
  • Setting e.Cancel=true in the RoleEnvironment_Changing event
  • The role host process exiting the RoleEntryPoint_Run method
  • The role host process crashing
  • A new version of the Azure Guest Agent [VM]
  • Host or Guest OS Updates [VM]
  • Reboot or Reimage management operation [VM]
  • A hardware issue on the physical server causing service healing and node movement [VM]
  • A communication failure between the Guest Agent and the Host Agent that lasts longer than 10 minutes [VM]

Comments (2)

  1. Majid says:

    Many thanks for your very informative blog. I have asked a question about restarting a worker role
    http://stackoverflow.com/questions/37809270/restarting-azure-worker-role-wawrokerhost-exe-manually
    1-How can I quickly restart a Worker role myself?
    2-How often does this ‘worker role status check’ occurs?
    3-Can I run something like the following and expect similar results to the WaHostBootstapper.exe or there are other consideration?
    WaWorkerHost.exe {MyAzureWorkerRole.dll}

    1. Hi Majid. Looks like you got a response on your SO post. In short, there is no instant way to do this, and you cannot manually start WaWorkerHost.exe. The best option is to call RequestRecycle (you can do this within your role code if you want, or you can do this from any other app such as a simple console app that you build).

Skip to main content