前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >jMeter创建微软Azure Lambda Function报错

jMeter创建微软Azure Lambda Function报错

作者头像
Jerry Wang
发布2020-04-25 13:25:08
4770
发布2020-04-25 13:25:08
举报

同时起10个线程:

创建的function名称为jerryfuncv3_{uuid}, uuid为从1到100之间的随机整数:

测试结果,10次有8次全是400 bad request:

比如这次jerryfuncv3_70就应该是创建失败了:

然而Azure上却能看到这10个成功创建好的function:

所以从结果上看Azure function创建成功了,但不知道Azure host runtime为什么会返回400 bad request…

有时候在Azure portal上手动创建function都会400 error?

代码语言:javascript
复制
{"properties":{"files":{"index.js":"module.exports = async function (context, req) {\r\n    context.log('JavaScript HTTP trigger function processed a request.');\r\n\r\n    if (req.query.name || (req.body && req.body.name)) {\r\n        context.res = {\r\n            // status: 200, /* Defaults to 200 */\r\n            body: \"Hello \" + (req.query.name || req.body.name)\r\n        };\r\n    }\r\n    else {\r\n        context.res = {\r\n            status: 400,\r\n            body: \"Please pass a name on the query string or in the request body\"\r\n        };\r\n    }\r\n};"},"test_data":"{\r\n    \"name\": \"Azure\"\r\n}","config":{"bindings":[{"authLevel":"anonymous","type":"httpTrigger","direction":"in","name":"req","methods":["get","post"]},{"type":"http","direction":"out","name":"res"}],"disabled":false}}}

在Azure API console里调用API也会报错:

错误消息详情:

代码语言:javascript
复制
{
  "Code": "BadRequest",
  "Message": "Encountered an error (InternalServerError) from host runtime.",
  "Target": null,
  "Details": [
    {
      "Message": "Encountered an error (InternalServerError) from host runtime."
    },
    {
      "Code": "BadRequest"
    },
    {
      "ErrorEntity": {
        "Code": "BadRequest",
        "Message": "Encountered an error (InternalServerError) from host runtime."
      }
    }
  ],
  "Innererror": null
}

https://github.com/microsoft/vscode-azurefunctions/issues/1838

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2020-04-24 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档