您的位置 首页 > 腾讯云社区

jMeter创建微软Azure Lambda Function报错---Jerry Wang

同时起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?

{"properties":{"files":{"index.js":"module.exports = async function (context, req) {rn context.log('JavaScript HTTP trigger function processed a request.');rnrn if (req.query.name || (req.body && req.body.name)) {rn context.res = {rn // status: 200, /* Defaults to 200 */rn body: "Hello " + (req.query.name || req.body.name)rn };rn }rn else {rn context.res = {rn status: 400,rn body: "Please pass a name on the query string or in the request body"rn };rn }rn};"},"test_data":"{rn "name": "Azure"rn}","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也会报错:

错误消息详情:

{ "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

---来自腾讯云社区的---Jerry Wang

关于作者: 瞎采新闻

这里可以显示个人介绍!这里可以显示个人介绍!

热门文章

留言与评论(共有 0 条评论)
   
验证码: