BotFramework: 'State size exceeded configured limit.'

梦想与她 提交于 2019-12-02 09:03:10

问题


I'm devloping a bot and whenever I PostAsync herocards (50 hero cards) in a formflow, in the end it gives me an error message: 'State size exceeded configured limit.' from Microsoft.Bot.Connector.DLL

Error happens when try to setPrivateConversationData Below the error on Emulator:

  "key": {
    "channelId": "emulator",
    "conversationId": "i99caeb8n2h7",
    "userId": "default-user"
  },
  "state": {
    "eTag": "1506952139325",
    "data": {
      "ResumptionContext": {
        "locale": "en-US",
        "isTrustedServiceUrl": true
      },
      "DialogState": "H4sIAAAAAAAEAOx9B2AjWX........",
      "ServiceUrl": "http://localhost:1460"
    }
  }
}

Response:

{
  "error": {
    "code": "MessageSizeTooBig",
    "message": "State size exceeded configured limit."
  }
}

Thank you everyone


回答1:


Per the docs, there is a limit on the amount of data you can store using the default State capabilities. Each state store (i.e., user, conversation, and private bot data bag) may contain up to 64kb of data.

You will have to store less info or to provide your own storage mechanism.

The following article shows how to manage state data using CosmosDb: https://docs.microsoft.com/en-us/bot-framework/dotnet/bot-builder-dotnet-state-azure-cosmosdb



来源:https://stackoverflow.com/questions/46527098/botframework-state-size-exceeded-configured-limit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!