Bot框架负载测试失败并显示400错误

时间:2018-08-22 07:13:49

标签: azure botframework

我正在尝试按照bot framework documentation中的说明进行负载测试

首先,我将我的详细信息发送给azure auth,并为自己获取令牌。然后,我以以下方式在向机器人服务发送的消息中包含此令牌

{
    "type": "message",
    "id": "sdcsdcsd928323",
    "channelId": "emulator",
    "conversation": {
    "id": "5eak34ff2m25"
  },
  "serviceUrl": "https://xxx-bot-xxx.azurewebsites.net",
    "text": "I am feeling angry",
  "from": {
    "id": "default-user",
    "name": "User"
  },
    "recipient": {
    "id": "dack329f3nfb",
    "name": "Bot"
  }
}

虽然我在客户端收到202接受的响应。我的后端日志显示以下错误:

Error: Failed to perform the requested operation on Azure Table. Message: The property value exceeds the maximum allowed size (64KB). If the property value is a string, it is UTF-16 encoded and the maximum number of characters should be 32K or less.
RequestId:79e296f0-3002-0039-37e5-390397000000

我猜想机器人正在尝试将其状态保存在azure表中,但是有些值太大。关于我可能要去哪里的任何想法?

我也收到随后的错误消息:猜测其相关性

Error: Request to 'https://xxxx-xxx-xxxx.azurewebsites.net/v3/conversations/5eak34ff2m25/activities/sdcsdcsd928323' failed: [404] Not Found

1 个答案:

答案 0 :(得分:0)

  

错误:请求   'https://xxxx-xxx-xxxx.azurewebsites.net/v3/conversations/5eak34ff2m25/activities/sdcsdcsd928323'   失败:[404]找不到

是由于没有MockChannel设置:https://github.com/Microsoft/BotFramework-Samples/blob/master/blog-samples/CSharp/MockChannel/Controllers/MockChannelController.cs这是一个c#示例,但是显示了如何正确响应端点:

v3/conversations/{conversationId}/attachments/UploadAttachment
v3/conversations/{conversationId}/activities/{activityId}/members/GetActivityMembers
v3/conversations/{conversationId}/members/GetConversationMembers
v3/conversations/{conversationId}/activities/{activityId}/DeleteActivity
v3/conversations/{conversationId}/activities/{activityId}/UpdateActivity
v3/conversations/{conversationId}/activities/{activityId}/ReplyToActivity
v3/conversations/{conversationId}/activities/SendToConversation
v3/conversations/CreateConversation

  

错误:无法在Azure Table上执行请求的操作。   消息:该属性值超出了最大允许大小(64KB)。   如果属性值为字符串,则它是UTF-16编码的,并且   最大字符数应为32K或更少。   RequestId:79e296f0-3002-0039-37e5-390397000000

与其他有关。机器人状态下存储了什么(用户数据,对话数据,私人对话数据和对话数据)?