“始终开启"的含义Azure 网站上的设置 [英] Meaning of "Always On" setting on Azure Web Site

查看:27
本文介绍了“始终开启"的含义Azure 网站上的设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在 Azure 上使用免费的 BizSpark 订阅并将我们的应用程序托管为 Azure 网站.我们定期遇到网站意外关闭的问题,这对我们的应用程序来说非常痛苦,因为它有很多后台进程在运行.

We are using free BizSpark subscription on Azure and hosting our application as Azure Web Site. We periodically struggle with unexpected site shutdowns what's very painful for our application since it has a lot of background process running.

始终开启"设置可以解决此问题,但遗憾的是我们在当前订阅中不可用.

"Always on" setting can be a remedy for this problem, but unfortunately it's unavailable for us in the current subscription.

您可能知道 IIS 有两个设置回收基于:

As you may know IIS has two settings recycle based on:

  1. 默认情况下,每个应用程序每 1740 终止一次分钟(29 小时) - 定期重启超时.
  2. 如果未使用,也可以回收应用程序20 分钟 - 空闲超时.

我想知道如果我们打开始终开启"设置,我们是否可以确定它有助于我们防止上述两种应用程序回收类型.

I'd like to know if we turn on "Always on" setting, can we be sure that it helps us to prevent both application recycles types described above.

顺便说一下,我发现了这个问题:将始终开启"设置防止空闲超时和定期重启? 与类似的主题.它说这个设置应该有帮助.

By the way, I found this question: Will "Always On" setting prevent BOTH idleTimeout and periodicRestart? with similar topic. It says that this setting should help.

但我想确定,这是真的.因为在我们的案例中,实时后台进程的中断是绝对不能接受的.

But I'd like to be sure, that it's true. Because interruptions of live background processes are absolutely unacceptable in our case.

感谢任何答案.

推荐答案

是的,当您打开始终开启"时,两者都会被阻止.您链接到的问题的答案(Will Always On"; 设置 prevent BOTH idleTimeout 和periodicRestart?) 包含完整的详细信息.如果您有多个运行Always On"的实例也将确保它们都保持运行.

Yes both will be prevented when you have "Always On" turned on. The answer to the question you linked to (Will "Always On" setting prevent BOTH idleTimeout and periodicRestart?) contains the full details. If you have multiple instances running "Always On" will also ensure that all of them stay running.

对于长时间运行的进程,如果可以,我强烈建议您使用 Azure Web 作业.Azure Webjobs SDK 将使您的开发生活更加轻松,并免费为您提供许多不错的监控.在此处查看 Scott Hanselman 的本教程:http://www.hanselman.com/blog/IntroducingWindowsAzureWebJobs.aspx

For long running processes I'd highly recommend using Azure Web Jobs if you can. The Azure Webjobs SDK will make your development life a lot easier and provide you with a lot of nice monitoring for free. Check out this tutorial by Scott Hanselman here: http://www.hanselman.com/blog/IntroducingWindowsAzureWebJobs.aspx

仅供参考,Webjobs 在您网站的上下文中运行,因此如果您的网站被回收(如果 Always On 被禁用),那么您的 Webjob 也将停止运行.启用始终开启"将使您的网络作业和网站保持正常运行.

FYI, Webjobs run in the context of your website, so if your website is recycled (if Always On is disabled) then your Webjob will also stop running. Enabling "Always On" will keep both your web jobs and your web site up.

这篇关于“始终开启"的含义Azure 网站上的设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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