[Directline] websocket slow response
Bot Info
- Bot handle: iop1
- App ID: 249488d0-9993-4dbe-833c-0453fd060024
- SDK Platform: nodejs
- SDK Version: latest
- Active Channels: directline
- Deployment Environment:
Issue Description
I'm using directline with websockets the bot response is taking about 30s each message to arrive to client
Code Example
any
Reproduction Steps
- say Hello to bot
- directline server responds to hello
- message takes 30s or more to arrive to websocket client
Expected Behavior
message should arrive on client within seconds
Actual Results
inconsistency, messages take long time to come or never arrive to direct line client
I just tested your bot on skype and webchat, the first message is the only one that took a long time to show up. All the other messages took about 1-3 seconds which is fairly normal. For directline are all messages slow?
Keep in mind after 15 minutes of non-use your bot will go to sleep so the first message will generally be slow. there are ways to avoid this. First, you can enable always on assuming you are using Azure. The second option is to set up something like a web job that will ping your bot every 15 minutes to keep it awake.
I experienced slowness only on directline channel. Is there any recommendation when using websockets, like number of sockets or conversations / hour limitation?
Slow response on first message is a known issue and there's currently no work-around.
The best thing to do in this scenario is to keep your bot active. Via users or other test automation.