如何防止 Azure 网站进入休眠状态? [英] How to prevent an Azure website from going to sleep?

查看:14
本文介绍了如何防止 Azure 网站进入休眠状态?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将一个 ASP.NET 5、MVC 6 Web 应用程序部署到 Azure.似乎如果我 10-15 分钟不点击该网站,它就会进入睡眠状态,它需要 10-15 秒才能醒来.

I deployed an ASP.NET 5, MVC 6 web application to Azure. It seems that if I don't hit the site for 10-15 minutes, it goes to sleep and it takes a good 10-15 seconds for it to wake up.

我不确定是进入睡眠状态的网站,还是它连接的数据库.

I am not sure whether its the website that's falling asleep, or the database that it's connecting to.

所以 2 个问题.

  1. 如何防止网站过早进入休眠状态.
  2. 有没有办法通过网站和数据库了解 Azure 中发生的事情.他们被踢出内存了吗?

推荐答案

Azure Web Apps 有一个始终开启"选项(带有基本/标准层),可以让你的应用(和相关的 Web 作业)保持加载状态.

Azure Web Apps have an 'Always on' option (with basic/standard tiers) which keep your app (and associated web jobs) loaded.

查看设置下,您会看到应用程序设置":

Look under Settings, and you'll see 'Application settings':

然后查找始终开启"设置(免费套餐将禁用该设置):

Then look for the 'Always on' setting (which will be disabled for Free tier):

这篇关于如何防止 Azure 网站进入休眠状态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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