如果热身失败,请勿交换

时间:2018-11-12 19:51:07

标签: azure azure-web-sites azure-deployment-slots

我有一个用于我的应用程序的部署槽,并且在web.config中有此部分:

   <applicationInitialization doAppInitAfterRestart="true">
     <add initializationPage="/validate" hostName="Test-UI" />
   </applicationInitialization>

我已为该插槽打开了自动交换功能。

如果页面返回错误(状态500),插槽仍会交换吗?

编辑:我不能只是继续破坏应用程序以对其进行测试,因为我们有一个相当复杂的过程甚至无法进入部署部分。

1 个答案:

答案 0 :(得分:1)

Will the slot still swap if the page returns an error (status 500) ?

In short, yes, it will still swap.

In order to better understand the reasons for the swap failures it is first necessary to explain how the application code in the staging slot is initialized / warmed up prior to the swap to production.

Failures during these steps are the most common reasons for the overall failure of the swap operation.

So, if you get failures when initialized or warm up slot, it will cause failure of swap operation.

For more details, you could refer to this article.