[Issue] Delay in bot response after idle time in hours?
Bot Info
- SDK Platform: .NET
- SDK Version: 3.12.2.4
- Active Channels: FB Messenger
- Deployment Environment: Azure App Service
Issue Description
We are seeing a delay in the bot of around 4-5 seconds when connecting to facebook,botframework.com especially if the bot been idle for hours.
Here is a screenshot of app insights https://i.imgur.com/YCVzevN.png
Our app service is deployed in Azure West Europe.
Expected Behavior
Less than 1 second delay.
@etbuilder , in which app service plan do you have your bot application hosted on?
The free tier of AppServices in Azure goes to "sleep mode" after an specific interval of time has passed (I believe is around an hour or so). This means, that once the app service goes in this mode, the next request will have a delay (while the app service is going fully on) and then will respond normally with no delays until the next sleep mode. This is something common in hosting services (you will find something similar in Heroku with their gyro system), and as I said, only happens in Free Tier.
You can look at more specifications here: https://azure.microsoft.com/en-us/pricing/details/app-service/plans/ *The specific part you want to look at is at the row "Always On"
@xjose97x We are on the standard plan with always on enabled, and 5 minutes availability tests from app insights, the issue highlighted in the image shows delay in communicating with facebook.botframework.com from our web app, so the message already received by the web app, but a delay happened when trying to communicate with bot connector service.
We are also following this https://blog.botframework.com/2017/11/02/optimizing-latency-bot-framework/
I have exactly same issue with all my bots on skype channel. I have "Always On" enabled but it does not make any difference. My service plan is B3.