context.PostAsync() randomly becomes slow, taking around 20 sec
Bot Info
- SDK Platform: .NET
- SDK Version: 3.8.1.0
- Active Channels: Direct Line
- Deployment Environment: Azure App Service deployed version
Issue Description
Sometime PostAsync in bot code is taking long time to execute. below line - await context.PostAsync("hello");
Usually it takes 500 ms and in some cases it takes around 30-45 seconds.
Expected Behavior
Response time should remain similar around 500ms.
The Azure Bot Service is experiencing degraded performance that is impacting customers under certain conditions. Our engineering team has identified a root cause and implemented a solution that should mitigate the problem. Today, the fix was deployed to a subset of datacenters where it’s undergoing validation. Pending further verification the team will continue to deploy the fix to datacenters worldwide.
Please let us know if you are still having this issue.
Performance seems to have been improved a lot.
In some cases when any particular user leave bot ideal for around 1 hour and then resume conversation, in that case bot takes almost 1 minute to reply.
HI @shubhamchawla
The fix has been deployed worldwide. Glad to hear performance has improved.
The slow response at startup sounds like a standard cold start issue. We have a blog post that explains some things you can do to improve latency: https://blog.botframework.com/2017/11/02/optimizing-latency-bot-framework/
It is happening when user goes away, whereas conversation for other users are running fine with no delay. For eg. User A is ideal for 1 hour, during this same window my other users B,C, D etc are chatting fine (so server wont go in sleep mode). Now when user A comes back then bot responds back in almost in 1 min.