Feb 26 2020 04:29 PM
I'm trying to add a custom page for warmup so that after swapping slots in azure dev ops release pipeline, the application from the secondary slot will be warmed up.
Web.config:
...
<applicationInitialization>
<add initializationPage="/Warmup.aspx">
</applicationInitialization>
...
aspx page:
public partial class Warmup : System.Web.UI.Page
{
protected void Page_Init(object sender, EventArgs e)
{
Thread.Sleep(600000); // 10 minutes
}
}
For test, I added Thread.Sleep without real code.
A swap takes about 3 minutes, although at least a warm-up should take 10 minutes. As a result, I get a cold application.
What am I doing wrong?
Dec 03 2020 01:55 AM
Solution@user6868 I'm guessing that the request is timing out
During the swap operation the site in the staging slot is warmed up by making an HTTP request to its root directory.
By default the swap will proceed as long as the site responds with any status code.
Utilizing this, could help to avoid cold starts, undesired downtimes or high latency situations.
However, if you prefer the swap to not proceed if the application fails to warm up then you can configure it by using these app settings: