Reputation: 6638
We have a website running in azure as a Web App. Only 1 instance of the site is running. We are seeing regular downtimes for the site, and wondering why.
We use Elmah to log exceptions, and before a downtime occurs we can't see any relevant or critical errors. What we do see however, is that AFTER the downtime, the site is back up but on another server. (We can see this because the hostname of the server changes, and when an exception is thrown we can see in Elmah from which server it originated.) Small example:
Server: X
Some small Exception thrown on server X, shows up in Elmah
site goes down
Site comes back up
Server: Y
Some small exception thrown on server Y, shows up in Elmah
Now I know that azure has Rapid Fail Protection and Auto Healing, but in our scenario, I cant tell the difference between our site
a) moving to another server and going down (because there is only 1 instance)
b) rapid fail protection or auto healing kicking in
If it's option a: does anyone know based on what azure moves sites?
if it's option b: does anyone know how I can determine why/how something triggered a rapid fail protection or auto healing kick in?
Upvotes: 0
Views: 182
Reputation: 24636
Your site can and will get moved to another server for a variety of reasons. The main two are:
By auto heal I assume you're talking about this feature. When auto heal kicks in your site will stay on the same server.
Summary: If it's an issue with the server (it went down/is being upgraded) then you'll be moved to a new server. If it's an issue with your app (auto-heal, crash) then you'll stay on the same server.
Upvotes: 3
Reputation: 1182
In this case what do you consider "downtime"? does the site start throwing a bunch of 50X errors?
In general when the site gets moved to a different machine it should be fairly transparent not cause "downtime".
Upvotes: 0
Reputation: 18387
You don't control in which server your webapp will run, since it's PaaS. Azure unloads your site if it is idle for the standard 20 minute timeout, probably on the next request, your webapp have started in another VM.
A few things you can do:
1-) Start a new instance (Microsoft recommends at least two instances)
2-) Enable Always On, which will ping your site constantly to avoid that.
Upvotes: 2