Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[Direct Line] Bot state calls fail under load (5 or more concurrent users) #3922
[Direct Line] Bot state calls fail under load (5 or more concurrent users)
Bot state calls fail when our bots are under load of 5 or more concurrent users interacting with it at one time.
We are deploying our bot to production now and when the bot is under 'load' (Multiple simultaneous interactions or load test) on any of our environments we start encountering direct line errors and the bot falls over.
This happens as soon as we have 5 or more concurrent users, which is well below what is expected and required. The error of 5 concurrent users resulting in the bot falling over is regardless of what size app service plan we are running as we have tried to scale and the result is the same.
The calls that seem to be failing are the botstate Direct Line call. Here are some example calls that failed.
We have run the tests on a S1, S2 and S3 app service plan, all with the same result - 5 or more users the bot falls over.
A load test was run on our bot.
Bot starts falling over after 5 concurrent users and is completely un-usable at 15 users.
A similar issue was raised previously of slow responses from Direct Line and can be seen here: #3787
Have you implemented a custom state client? The default is intended only for prototyping. https://blog.botframework.com/2017/07/18/saving-state-azure-extensions/
Also, please do not load test the direct line channel. If you wish to load test the bot, call it directly. https://blog.botframework.com/2017/06/19/load-testing-a-bot/
Note: I'm using the InMemoryDataStore as you can see bellow:
I've already did what was described on the blog post about
I don't know what can I do now to make my bot scale to much more users simultaneously. Scaling to multiple users is a key requirement to make it acceptable, and my time is rushing as my production ready deadline is getting close.
Could you guys please help-me to investigate it ? For me it seems to be a problem on BotConnector, but I'm not sure ? If needed I' could share my code privatly with you and your team @EricDahlvang .