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

HTTP status code GatewayTimeout (Is error in Azure Channel Registration?)

Open wladneto opened this issue 8 years ago • 37 comments

Bot Info

  • SDK Platform: .NET
  • SDK Version: 3.12.2.4
  • Active Channels: Telegram, FacebookMesseger and Slack
  • Deployment Environment: Azure Web App and Bot Channels Registration

Issue Description

I have a chatbot in production (more than a month), and yesterday at night I've had some issues regarding exceptions being thrown within the chatbot, resulting in the "Sorry my bot code is having an issue" message. It´s happen only in production... In localhost works normally. My application is in South Central US region...

Is it an problem with the registration channel in azure?

Code Example

Reproduction Steps

  1. Send a message in production (in any channel)
  2. Bot response - POST to BotXPTO timeout after 15s or Sorry, my bot code is having an issue

Expected Behavior

Solve that situation... :(

Actual Results

Channel Registration (Azure) image image image

wladneto avatar Jul 06 '18 12:07 wladneto

Hi @wladneto. I have already reported this on issue #4559. It's a really weird issue and really critical IMO. I have more than 10 bots facing this problem right now, and it seems like from yesterday to today the problem has really worsened.

PS: Quão estranho é que nós dois estamos reportando de Uberlândia?

ItsMeArthur avatar Jul 06 '18 12:07 ItsMeArthur

@ItsMeArthur pois é... rssss será que existe algum erro na conectividade do Brasil?

wladneto avatar Jul 06 '18 12:07 wladneto

I'm having the same issue. Was working fine before lunch ~1 h ago, I wanted to do a demo back from lunch, now I keep getting these Gateway errors. I get them in both Web App and Skype channels.

I restarted the App Service, since then the Web Chat channel is fine (both within Azure Portal and from a webpage embedded iframe. But the Skype channel is still kaput, I keep getting "Sorry, my bot code is having an issue."

Using West Europe region for the app, eu.luis.ai and spell check.

14geronimo avatar Jul 06 '18 13:07 14geronimo

@wladneto No issue que abri tem um cara até do Japão reportando o problema... Só espero que resolvam logo. Tá complicado pra quem tem bot em produção. O cliente não quer nem saber o que raios é Bot Connector.

ItsMeArthur avatar Jul 06 '18 14:07 ItsMeArthur

I've contacted MS support and hopefully they can tell us why this happens after investigation. Will update this post once I receive any reply from MS.

josephktcheung avatar Jul 06 '18 14:07 josephktcheung

@josephktcheung it´s a good news... so the problem is real for MS. Thanks for sharing and we waiting the answer

wladneto avatar Jul 06 '18 14:07 wladneto

Does anyone know anything that can replace this part of channel registration? Apparently the problem is in connecting the channel registration with the web application.

wladneto avatar Jul 06 '18 14:07 wladneto

Já tentei fazer o update de todos os pacotes no Nuget mas não ajudou nada. Sin, acho que o problema é geral. Nos aqui na Europa também temos a mesma situação. Também já tentei a solução do informático (reset ao serviço do app) mas no progress. Acho que foi o Microsoft que meteu água. Não me serve de muito, mas ... espero que os gajos em redmond não demorem muito a arrumar isto.

Carlosfbotelho avatar Jul 06 '18 14:07 Carlosfbotelho

new return from bot... :(
POST to the bot's endpoint failed with HTTP status 401

wladneto avatar Jul 06 '18 15:07 wladneto

That's wrong creds ... no?

Carlosfbotelho avatar Jul 06 '18 15:07 Carlosfbotelho

our bots seems to be working again now. Will wait for MS's reply nonetheless.

josephktcheung avatar Jul 06 '18 15:07 josephktcheung

no changes :( @Carlosfbotelho

wladneto avatar Jul 06 '18 15:07 wladneto

The Bot Framework team is aware of issues with the State Service which would affect bots on all channels. Calls to GetConversationDataWithHttpMessagesAsync and similar functions may take a long time or timeout entirely. Since most channels only wait 15 seconds for the bot to reply this could result in errors in both the client and the bot.

We created a hot fix and are expediting it through testing right now. It should be pushed to production world-wide in a few hours. Sorry for the impact and the delay!

Please note that the default State Store is not meant for Production use and has no guarantee of performance or availability. Bot developers should look at moving their bots to a dedicated State Store to insulate their bots from State Store problems.

https://docs.microsoft.com/en-us/azure/bot-service/dotnet/bot-builder-dotnet-state?view=azure-bot-service-3.0

vincec-msft avatar Jul 06 '18 15:07 vincec-msft

@vincec-msft thanks for the reply! We've been using dynamodb for our bot's storage, so I'm not sure previous errors happened in my bots were caused by the issues with the State Service. Anyway let's hope that this error won't happen again after the fix.

josephktcheung avatar Jul 06 '18 15:07 josephktcheung

Hmm, if you're already using a dedicated State Store then there might be another issue lurking. If you post a time (UTC), channel, and part of a conversation id (just the first or last couple characters should be fine) I'll look deeper.

vincec-msft avatar Jul 06 '18 15:07 vincec-msft

@vincef-msft, thanks for looking into the issue. It worked fine for couple hours but now seems to have returned. The same gateway timeout error. Did you guys change anything ? Best, Carlos

Carlosfbotelho avatar Jul 06 '18 16:07 Carlosfbotelho

@vincec-msft here's the last error info:

conversation id: 1695************-************4886 utc time: 2018-07-06T04:48:47.266Z channel: facebook

josephktcheung avatar Jul 06 '18 17:07 josephktcheung

I get unauthorised errors interleaved with gateaway timeout

Carlosfbotelho avatar Jul 06 '18 17:07 Carlosfbotelho

@vincec-msft This is what I found from azure app insight: Status code: GatewayTimeout Exception type: Microsoft.Bot.Schema.BotTimeoutException Failed method: Microsoft.Bot.ChannelConnector.BotAPI+d__30.MoveNext Call stack: Microsoft.Bot.Schema.BotTimeoutException: at Microsoft.Bot.ChannelConnector.BotAPI+d__30.MoveNext (Microsoft.Bot.ChannelConnector, Version=3.2.2.2, Culture=neutral, PublicKeyToken=null)

josephktcheung avatar Jul 06 '18 17:07 josephktcheung

Besides, I’m using node.js V3 of BotBuilder FYI

josephktcheung avatar Jul 06 '18 17:07 josephktcheung