当我进行部署插槽交换时,为什么 azure 会重新启动网站?

编程入门 行业动态 更新时间:2024-10-25 06:26:11
本文介绍了当我进行部署插槽交换时,为什么 azure 会重新启动网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

I've a 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:

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

    当我进行部署插槽交换时,为什么 azure 会重新启动网站?

    本文发布于:2023-10-28 17:55:28,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1537361.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:插槽   当我   重新启动   网站   azure

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!