Juho Rutila
Juho Rutila

Reputation: 2468

Azure Logic App FTP Create file fails with MaxRequestCountReached

I am creating an Azure Logic App that will create a new file (from HTTP body content of about 5KB) on an FTP server.

Here is the FTP Create File code snippet:

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

This step takes really long (32 minutes) and then fails with following error:

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

The file appears on the FTP server but only 2380 bytes from the end of the file is there.

What does this error mean and how to fix it? 5KB shouldn't be too much of data. Is this something about the FTP server? I can send the file with FileZilla without problems.

I even tested this so that I created another step (before the failing one) that will send the HTTP content statusCode (so, just "200") to a new file and it writes it, succesfully, in one second.

Upvotes: 2

Views: 1255

Answers (1)

Juho Rutila
Juho Rutila

Reputation: 2468

The reason this misbehaved was that I had disabled Binary Transport in the ftp API connection settings.

When I enabled the Binary Transport checkbox, it wrote the file in seconds.

Upvotes: 3

Related Questions