当我进行部署插槽交换时,为什么 azure 会重新启动网站? [英] Why would azure be restarting website when i do a deployment slot swap?

查看:23
本文介绍了当我进行部署插槽交换时,为什么 azure 会重新启动网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在 Azure 网站上运行的 .net 4.5 网站.我已经设置了暂存部署.我预热了两个站点,然后运行交换过程(来自 azure 门户和 Azure powershell).无论我尝试什么,交换过程都会重新启动我的网站(两者),并且它们需要大约 3 分钟才能启动.

I've a .net 4.5 website running on Azure Websites. I've a staging deployment set up. I warm up both sites and then i run the swap process (both from azure portal and from Azure powershell). No matter what I try the swapping process restarts my websites (both) and they take about 3 minutes to boot up.

我的印象是部署交换应该让网站保持温暖"并且没有停机时间?我的网站在大约 3 分钟内无法使用!

I was under the impression the deployment swapping was supposed to keep the websites "warm" and have no down time? My websites are unusuable for about 3 minutes!

据我所知,生产槽和暂存槽具有相同的应用程序设置等.

As far as I can tell both production and staging slots have the same application settings etc.

任何建议或指示将不胜感激.

Any advice or pointers would be greatly appreciated.

推荐答案

Jeff 是对的.当为插槽定义了粘性应用程序设置或连接字符串时,网站的工作进程将在交换期间重新启动.在这种情况下发生的动作顺序是这样的:

Jeff is right. When there are sticky app settings or connection strings defined for the slot then the website's worker process will be restarted during the swap. The sequence of actions that happen in that case is this:

  1. 将生产槽中的粘性设置应用到当前处于暂存槽中的站点工作进程.这会导致工作进程重启;
  2. 通过在站点应该运行的每个 VM 实例上向其根 URL 发出 http 请求来预热站点的工作进程;
  3. 在插槽之间交换工作进程.现在预热的工作进程处于生产槽中并正在接受生产流量;
  4. 将暂存槽中的粘性设置应用到当前处于暂存槽中的工作进程.此时这是用于生产"的工作进程.此配置更改会导致该工作进程重新启动,但此时它不会占用任何生产流量.

这篇关于当我进行部署插槽交换时,为什么 azure 会重新启动网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆