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

查看:114
本文介绍了为什么在执行部署槽交换时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天全站免登陆