Why do my Azure sites keep going down?
Asked Answered
C

1

7

I am testing Microsoft's Azure cloud platform and am hosting two very low-requirement websites. One is a simple single form MVC website that simply accepts some input from the user, performs some calculations, and spits out an output. The second is similar, but it performs a simple query against an Azure SQL Server instance.

Both websites go down constantly. What appears to be happening is that if I don't hit the website for awhile (maybe an hour or so) the GET request simply fails. Nothing is ever returned from the server. If I wait a minute or two and try again, the website works perfectly.

Anyone know what's happening or how I can fix it? I obviously cannot host websites on this platform if the reliability is this low...

Cuckooflower answered 24/11, 2012 at 18:29 Comment(6)
I've had multiple instances on Azure running for a few months and have never experienced what you're describing unless a webrole has been throwing an exception causing the role to recycle. Is this a webrole or azure websites?Agripina
One more possibly helpful piece of information. When I try to load the site in Chrome, I get the following: "Error 101 (net::ERR_CONNECTION_RESET): The connection was reset."Cuckooflower
Are you running in Free or Shared mode? You might want to watch this overview of the Windows Azure Web Sites Architecture, it describes how Quotas are achieved.Faceless
I'm running in Shared mode...Cuckooflower
@Cuckooflower - was your site hosted in the US? I see they had intermittent issues listed here: windowsazure.com/en-us/support/service-dashboard at the bottomAgripina
Yes... but it's still happening.Cuckooflower
F
9

Windows Azure Websites used a concept of cold (inactive) and warm (active) sites that means as long as a website has active connection it will be warm or active and after some default time, when the website does not have any active connection it will go in cold or inactive site mode. Once a new connection is established to the same site the site will wake up from inactive (cold) to active (warm) mode and depend on what kind of content needs to be rendered on the website, it may take a few seconds to complete the startup process. The concept of warm and cold sites is described here.

Technically the first GET request will fail if it returns immediately for a cold website however this call does make the site active and next requests will result success.

There was a SO discussion in which the index page had to connect to DB to get the data and because the connection time to DB was longer which resulted the overall start time longer then expected. So there could be several reason by transition from cold to warm may be longer and you can contact Windows Azure Websites team to check why there is the case.

Ferryboat answered 25/11, 2012 at 20:52 Comment(5)
Ok, this is the closest thing to an answer I've gotten from anyone and it does explain the symptoms perfectly. However, is there a solution? For instance, will switching to a reserved instance keep me in a warm state?Cuckooflower
Update: Reserved instance seems to help as the timeout period has increased from a minute or two to perhaps 15-20 minutes. However, I'm still having the problem. Can't really run a website on a platform that goes down every 15 minutes. Do I need to write a process to ping the website and keep it warm?Cuckooflower
As websites is still in preview there is no built-in feature available to keep it active. You would need to either add some script or have some kind of live connection available to meet your need. It is possible to have something built-in feature available when websites feature reaches to GA to meet such need with reserved instance.Ferryboat
I hadn't thought of a script. I will try spawning a thread in the background to fetch a resource every 5 minutes and see if that works.Cuckooflower
@Cuckooflower my solution was adding a HTTP GET monitor at monitor.us which the free subscription allows you to do it every 30 minutes. I tried setting AlwaysON to ON in Azure config but nothing changed, I also tried adding monitoring endpoints but same problem. This seems to have improved availability to our site netuyconf.comBlunder

© 2022 - 2024 — McMap. All rights reserved.