Microsoft Bot Framework-Bot进入睡眠状态.有办法预防吗?

问题描述:

我的基于bot框架的bot运行良好.但是,当我在一段时间不活动(例如一天)之后与机器人进行互动时,该机器人似乎需要很长时间(大约10-45秒)来发送其第一封回复.回复后,响应时间又不错了.

My bot based on the bot framework works pretty good. But when I first interact with the bot after a period of inactivity (let's say a day), then the bot seems to take very long time (about 10-45 seconds) to send back its first reply. After that reply the response time is pretty good again.

在我看来,后端服务进入某种睡眠模式,第一个请求将其唤醒.

To me it seems the back-end service goes to some kind of sleep mode and the 1st request wakes it up.

有什么方法可以影响这种行为?我担心用户的初始响应时间长.

Is there any way to influence this behavior? I concerned about the long initial response time for my users.

感谢您的帮助.

如果使用Azure网站,请参阅始终支持"

If using Azure website, see "Always On Support"

https://docs.microsoft. com/en-us/azure/app-service-web/web-sites-configure

始终打开.默认情况下,如果Web应用程序闲置了一段时间,则会将其卸载.这样可以节省系统资源.在基本"或标准"模式下,您可以启用始终开启"以始终保持应用程序加载.如果您的应用程序连续运行Web作业,则应启用Always On,否则Web作业可能无法可靠运行.

Always On. 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. If your app runs continuous web jobs, you should enable Always On, or the web jobs may not run reliably.