botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

context.PostAsync() randomly becomes slow, taking around 20 sec

Open shubhamchawla opened this issue 8 years ago • 4 comments

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.

shubhamchawla avatar Jun 18 '18 09:06 shubhamchawla

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.

EricDahlvang avatar Jun 18 '18 23:06 EricDahlvang

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.

shubhamchawla avatar Jun 19 '18 05:06 shubhamchawla

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/

EricDahlvang avatar Jun 20 '18 19:06 EricDahlvang

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.

shubhamchawla avatar Jun 21 '18 03:06 shubhamchawla