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

[Performance] GatewayTimeout

Open Badolfo opened this issue 9 years ago • 20 comments

Hi, having same error last night that I reported before (issue #2142) : 01/02/2017, 20:10:18 There was an error sending this message to your bot: HTTP status code GatewayTimeout

Regarding @eanders-MS question on issue #2142 , it was one hour previous to that time range that you mentioned.

Hoping you can give some help guys. Thanks

Badolfo avatar Feb 02 '17 05:02 Badolfo

I'm also facing the same issue in slack, it works fine in Teams. Mine is NodeJs bot.

rjesh-git avatar Feb 02 '17 06:02 rjesh-git

I'm also getting this GatewayTimeout error using direct line with c#

sayyednazeer avatar Feb 02 '17 08:02 sayyednazeer

Hi @Badolfo, @rjesh-git, and @sayyednazeer, if you're seeing these errors in the Bot Framework developer portal, that means we tried to contact your bot but were unable to reach it and timed out.

Are you able to contact your bot with the Bot Framework Emulator? And if so, does it respond quickly?

dandriscoll avatar Feb 02 '17 20:02 dandriscoll

@dandriscoll I'm able to contact bot from emulator and teams. Issue occurs only with the Slack channel.

rjesh-git avatar Feb 03 '17 01:02 rjesh-git

I'm seeing the same issue on Messenger. I am able to talk to the bot normally from the web chat on the botframework website.

suvamsh avatar Feb 04 '17 11:02 suvamsh

We're seeing the same issues with Direct Line (WebChat) but it works fine thru other channels (Slack or Facebook).

eduardoromero avatar Feb 04 '17 19:02 eduardoromero

I'm experiencing a lot of timeouts from the directline API, sometimes getting more than 5 seconds and it's really breaking my bots --> https://directline.botframework.com/v3/directline/conversations https://directline.botframework.com/v3/directline/conversations/XXXXX/activities

Seeing a lot of 503 responses

screen shot 2017-02-04 at 2 06 43 pm

chitopunk avatar Feb 04 '17 19:02 chitopunk

I get the same issue, with all channels but randomly and yes, my bots are up and working, simply sometimes connector seems to not work.

Another thing. Sometime the connector forward the call to my bot, I answer correctly but not forwarded to the user. 10 seconds after it works perfectly.

Really frustrating for professional scenario.

galazzo avatar Feb 07 '17 15:02 galazzo

i'm having the same issue and it' really hard to debug .

Mob4 avatar Feb 16 '17 13:02 Mob4

Hi @Mob4 @galazzo @chitopunk & @eduardoromero

As mention in #2078 by @msft-shahins and @dandriscoll ...

luisdelay

sayyednazeer avatar Feb 17 '17 10:02 sayyednazeer

@dandriscoll any update on this thread..?

sayyednazeer avatar Mar 01 '17 11:03 sayyednazeer

I am also facing this on facebook

fercom avatar Mar 06 '17 21:03 fercom

Hi folks- There can be a lot of causes for issues like this. Unfortunately there are so many issues in this thread, there's no single answer.

The first step is to determine whether the problem exists within your bot. If so, look at dependencies your bot calls, like LUIS, the Bot State API, and your own APIs. Most performance-sensitive bots drop the Bot State API dependency and use the BotFramework-Azure libs to use local storage. Also look for deadlocks.

If you're using the Direct Line channel, you can enable the "High-speed storage" feature on your bot's Direct Line configuration page. This will be the default eventually.

If the problem persists, consider where your bot is deployed. Bots deployed in the US typically have fast access to services. Bots outside the US may be located near Singapore or Dublin for faster access.

Lastly, there may be problems related to specific channels, although these tend to be intrinsic to the channel (e.g., SMS and email delays, which are not something we can control). We monitor service performance but interruptions to occasionally occur, so if you've tried the steps above but are still having trouble with one channel in particular, please let us know and we can investigate.

dandriscoll avatar Mar 10 '17 04:03 dandriscoll

@dandriscoll I think it is not solved, many of my bots still throw the GatewayTimeout Exception even at the same time, I am almost sure it is something in the botframework

fercom avatar Apr 12 '17 19:04 fercom

Hi, Am also facing the same issue. ut seems like something related to the framework. To add on, I can also see the bot restarts on most of the platforms a lot but not much on Facebook.

By restart I mean it goes to the starting point of the bot without any problem when waiting for the user input.

And my bot is hosted in Azure in south central US.

Here is my bot link https://bots.botframework.com/bot?id=Horoscope_Bot

alokraj68 avatar May 22 '17 11:05 alokraj68

I am facing the "Failed to send activity: bot timed out" intermittently. 502 error. Sometimes it works, sometimes in between it gives me this error. Till bot connector, message is reaching from webchat via directline. At botconnector I am getting this message "There was an error sending this message to your bot: HTTP status code GatewayTimeout".

ghost avatar Dec 18 '17 10:12 ghost

Hi All,

Even I am facing this issue and its too frequent. Impacting Business. Anyone has found any solution to resolve this?

Please Help resolve this.

Thanks

tinuCoder avatar Mar 15 '18 07:03 tinuCoder

Same issue for me as well on integrating the bot in Facebook channel. Please help !

durgeshNdas avatar Mar 16 '18 21:03 durgeshNdas

Hi All,

Why this issues was closed ?

Anyone has found any solution to resolve this? You have a tips or azure configuration solution ?

Please Help resolve this. Thanks.

SudDevPP avatar Jun 06 '18 10:06 SudDevPP

@SudDevPP This issue has been closed because there is no single answer for a resolution to the problem within the bot. This issue is not an sdk, or bot framework issue. Bot developers need to ensure their bot responds with a valid status code within 15 seconds. Gateway Timeouts occur when a bot takes longer than 15 seconds to respond. If the developer knows the response will take longer than 15 seconds, it is possible, depending on the channel, to start a separate thread to handle the long running process, return a valid status code on the receiving thread, and when the process finishes, send a proactive message from the background thread.

If you require further assistance, please open a new issue or ask this question on Stack Overflow.

EricDahlvang avatar Jun 06 '18 20:06 EricDahlvang