App Service Web App是否“进入睡眠状态"? [英] Does App Service Web App "go to sleep?"

查看:86
本文介绍了App Service Web App是否“进入睡眠状态"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一个问题,即来自外部应用程序(订阅注册)的API超时并失败,同时Azure表示存在HTTP服务器错误.

I experienced a problem where an API from an external application (subscription signup) timed out and failed, and at the same time Azure said there was an HTTP Server Error.

这发生了两次.

稍后,我直接使用现有订阅登录了该应用程序.工作正常,没有延误.然后,我再次进行了订阅注册API,它运行良好.

I bit later I logged into the app directly with an existing subscription.  Worked fine, no delays.  I then did the subscription signup API again, and it worked fine.

什么可能导致该行为?

Web App是否有可能进入睡眠状态"?如果不定期使用它?因此,当我较早发送订阅注册时,它睡着了",但是在我登录后唤醒"了订阅.然后是后来的订阅 注册有效吗?

Is it possible that the Web App "goes to sleep?" if it is not being used regularly?  So when I sent the subscription signups earlier, it was "asleep", but after I logged in it "woke up" and so then the later subscription signups worked?

或...

订阅API处理的一部分是应用程序使用SendGrid发送电子邮件.

Part of the subscription API processing is that the application sends an email, using SendGrid.

SendGrid是否需要热身"?

Could it be that SendGrid needs to "warm up"?

(我将不得不更仔细地查看代码,以查看API处理是否需要在收到电子邮件服务器之前进行确认,即在输出SendGrid API完成之前不确认入站订阅API).

(I'll have to look at the code more closely to see if the API processing requires an confirmation from the email server before it i.e. the inbound subscription API is not acknowledged until the output SendGrid API completes).

任何有关如何对此进行调查的想法都将不胜感激.

谢谢!  

Any thoughts about how to investigate this would be appreciated.

Thanks!  

推荐答案

始终在线

By default, web apps are unloaded if they are idle for some period of time. This lets the system conserve resources. In Basic or Standard mode, you can enable Always On to keep the app loaded all the time.

可以在Web应用程序的应用程序设置"边栏选项卡中打开此设置.它每隔5分钟向您的网站根发送一次ping操作,以使其保持温暖.

This setting can be turned on in the 'application settings' blade of your web app. It sends a ping to the root of your site every 5 minutes to keep it warm.


这篇关于App Service Web App是否“进入睡眠状态"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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