Azure功能-超出HTTP触发请求长度 [英] Azure Function - HTTP trigger request length exceeded

查看:115
本文介绍了Azure功能-超出HTTP触发请求长度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个小的 azure函数-HTTP触发器,该函数托管在Azure云上.它的主要功能是简单地接收带有CSV文件作为有效载荷的发帖请求.

I am creating a small azure function - HTTP trigger that is hosted on the Azure Cloud. Its main function is to simply receive post requests with a CSV file as payload.

但是,某些发布的文件大于100mb,这导致以下异常:

However, some of the files that are posted are larger than 100mb, which results in the following exception:

执行函数时发生异常->异常绑定参数'req'->超出了传入消息的最大消息大小配额(104857600).要增加该配额,请在适当的绑定元素上使用MaxReceivedMessageSize属性.

我已经尝试过搜索并且基于azure函数文档进行搜索 来自Microsoft:"functions-bindings-http- webhook"

I have tried to google my way and based on the azure function documentation from Microsoft: "functions-bindings-http-webhook"

据说

HTTP请求长度限制为100 MB(104,857,600字节),URL长度限制为4 KB(4,096字节).这些限制由运行时的 Web.config 文件的httpRuntime元素指定.

The HTTP request length is limited to 100 MB (104,857,600 bytes), and the URL length is limited to 4 KB (4,096 bytes). These limits are specified by the httpRuntime element of the runtime's Web.config file.

但是,我无法在解决方案中实际找到 Web.config ,所以我希望这不是真的适用,或者我完全不在这儿吗?

Yet, I am unable to actually locate the Web.config within my solution, so I expect this is not really applicable or am I just totally off here?

该项目是从Visual Studio生成的,具有以下相关的依赖项和扩展名:

The project is generated from Visual Studio with the following related dependencies and extensions:

  • Microsoft.Net.Sdk.Functions(1.0.24)

  • Microsoft.Net.Sdk.Functions (1.0.24)

Azure功能和Web作业工具(15.10.2046.0)

Azure Functions and Web jobs Tools (15.10.2046.0)

有什么方法可以增加接收到的请求的最大邮件大小限制?

Are there any ways to increase the maximum message size limit for the received requests?

推荐答案

但是,我认为这种方法是有风险的.如果出现网络问题,您可以轻松地收到超时.

However, I believe this approach is risky. In case of networking issues you can easily receive a timeout.

我建议您将CSV上传到Blob存储中,并为您的函数创建Blob触发器.

I would recommend that you upload your CSVs in a blob storage, and create a blob trigger for your function.

这篇关于Azure功能-超出HTTP触发请求长度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆