Azure Logic App FTP创建文件失败并显示MaxRequestCountReached

时间:2019-06-10 05:00:02

标签: azure ftp azure-logic-apps

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

这是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内容statusCode(因此仅为“ 200”)发送到一个新文件,并在一秒钟内成功地将其写入。 / p>

1 个答案:

答案 0 :(得分:1)

行为不当的原因是我在ftp API连接设置中禁用了二进制传输。

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