Azure 逻辑应用 FTP 创建文件失败并出现 MaxRequestCountReached

标签 azure ftp azure-logic-apps

我正在创建一个 Azure 逻辑应用程序,它将在 FTP 服务器上创建一个新文件(来自大约 5KB 的 HTTP 正文内容)。

以下是 FTP 创建文件代码片段:

{
    "inputs": {
        "host": {
            "connection": {
                "name": "@parameters('$connections')['ftp']['connectionId']"
            }
        },
        "method": "post",
        "body": "@body('Provider_Post')",
        "path": "/datasets/default/files",
        "queries": {
            "folderPath": "/",
            "name": "filename_@{utcNow()}.xml",
            "queryParametersSingleEncoded": true
        },
        "authentication": "@parameters('$authentication')"
    },
    "runtimeConfiguration": {
        "contentTransfer": {
            "transferMode": "Chunked"
        }
    }
}

此步骤需要很长时间(32 分钟),然后失败并出现以下错误:

MaxRequestCountReached. The maximum number of requests allowed '1000' was not sufficient to upload the entire content. Uploaded content length: '2378'. Total content length: '4877'.

该文件出现在 FTP 服务器上,但距文件末尾仅 2380 字节。

此错误意味着什么以及如何修复它? 5KB 不应该是太多的数据。这是关于 FTP 服务器的事情吗?我可以毫无问题地使用 FileZilla 发送文件。

我什至对此进行了测试,以便我创建了另一个步骤(在失败的步骤之前),该步骤将 HTTP 内容状态代码(因此,只是“200”)发送到一个新文件,并在一秒钟内成功写入它。

最佳答案

出现这种错误的原因是我在 ftp API 连接设置中禁用了二进制传输。

当我启用“二进制传输”复选框时,它会在几秒钟内写入文件。

关于Azure 逻辑应用 FTP 创建文件失败并出现 MaxRequestCountReached,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56520731/

相关文章:

Azure 服务总线 - 估计代理连接的数量

azure - 具有针对不同环境和插槽的许多appSettings的Azure功能的ARM模板

linux - 在 shell 脚本中使用的持久非交互式 FTP session

具有 Azure Blob 存储操作的 Azure 逻辑应用程序 : Getting 429 statusCode error

Azure 逻辑应用 : how to run Powershell script or Azure CLI?

azure - 将 Azure RM 值放入变量中

azure - Azure 应用程序网关是否支持条件 mTLS

hadoop - 将文件从 FTP 复制到 HDFS

c# - 为什么 FtpWebRequest 会为此现有目录返回一个空流?

azure - 如何在逻辑应用中自定义 "Create HTML Table"中的结果