如何防止Azure网站入睡? [英] How to prevent an Azure website from going to sleep?

查看:216
本文介绍了如何防止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有一个Always on选项(带有基本/标准层)这会保持你的应用程序(和相关的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天全站免登陆