SamJolly
SamJolly

Reputation: 6477

How does one know why an Azure WebSite instance(WebApp) was shutdown?

By looking at my Pingdom reports I have noted that my WebSite instance is getting recycled. Basically Pingdom is used to keep my site warm. When I look deeper into the Azure Logs ie /LogFiles/kudu/trace I notice a number of small xml files with "shutdown" or "startup" suffixes ie:

2015-07-29T20-05-05_abc123_002_Shutdown_0s.xml

While I suspect this might be to do with MS patching VMs, I am not sure. My application is not showing any raised exceptions, hence my suspicions that it is happening at the OS level. Is there a way to find out why my Instance is being shutdown?

I also admit I am using a one S2 instance scalable to three dependent on CPU usage. We may have to review this to use a 2-3 setup. Obviously this doubles the costs.

EDIT

I have looked at my Operation Logs and all I see is "UpdateWebsite" with status of "succeeded", however nothing for the times I saw the above files for. So it seems that the "instance" is being shutdown, but the event is not appearing in the "Operation Log". Why would this be? Had about 5 yesterday, yet the last "Operation Log" entry was 29/7.

An example of one of yesterday's shutdown xml file:

2015-08-05T13-26-18_abc123_002_Shutdown_1s.xml

Upvotes: 1

Views: 1126

Answers (3)

Byron Tardif
Byron Tardif

Reputation: 1182

Are you seeing any side-effects? is this causing downtime?

When upgrades to the service are going on, your site might get moved to a different machine. We bring the site up on a new machine before shutting it down on the old one and letting connections drain, however this should not result in any perceivable downtime.

Upvotes: 0

ahmelsayed
ahmelsayed

Reputation: 7402

Every site on Azure runs 2 applications. 1 is yours and the other is the scm endpoint (a.k.a Kudu) these "shutdown" traces are for the kudu app, not for your site.

If you want similar traces for your site, you'll have to implement them yourself just like kudu does. If you don't have Always On enabled, Kudu get's shutdown after an hour of inactivity (as far as I remember).

Aside from that, like you mentioned Azure will shutdown your app during machine upgrade, though I don't think these shutdowns result in operational log events.

Upvotes: 4

Bruno Faria
Bruno Faria

Reputation: 5272

You should see entries regarding backend maintenance in operation logs like this:

enter image description here

As for keeping your site alive, standard plans allows you to use the "Always On" feature which pretty much do what pingdom is doing to keep your website warm. Just enable it by using the configure tab of portal.

Configure web apps in Azure App Service

https://azure.microsoft.com/en-us/documentation/articles/web-sites-configure/

Upvotes: 5

Related Questions