PaaS Cloud Service Role Restart Scenarios


There are several reasons why a PaaS cloud service role instance will restart or recycle.  This could be a recycle of just the role host processes (WaWorkerHost.exe / WaIISHost.exe) or a reboot of the VM itself.  For more information about what happens to the content on the disks inside the VM in these various scenarios see https://blogs.msdn.microsoft.com/kwill/2012/10/05/windows-azure-disk-partition-preservation/

 

 

These restarts will leave the VM running, but cause the role host processes within the VM to restart.  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

 

These restarts will cause the VM itself to either restart or be moved to a new server.

  • A new version of the Azure Guest Agent
  • Host or Guest OS Updates
  • Reboot or Reimage management operation
  • A hardware issue on the physical server causing service healing and node movement
  • A communication failure between the Guest Agent and the Host Agent that lasts longer than 10 minutes
  • Unexpected host reboots such as powercycles or bugchecks
  • Planned maintenance or hardware decommissioning which will cause Azure to proactively move VMs to new servers (you will receive advance notification emails)

 


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