Blog Post

Azure Integration Services Blog
1 MIN READ

The provided file size 'xxxxxxxxx' for the create or update operation exceeded the maximum allowed

Shailesh_Agre's avatar
Shailesh_Agre
Icon for Microsoft rankMicrosoft
Dec 16, 2020

Scenario:
Within Logic App constructing a string variable - sendtosftp
Using this data creating a new file on the SFTP server.
If the constructed variable size exceeds 50 MB size limit, get an error similar to:

{
  "status": 400,
  "message": "The provided file size '58100000' for the create or update operation exceeded the maximum allowed file size '52428800' using non-chunked transfer mode. Please enable chunked transfer mode to create or update large files.\r\nclientRequestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "error": {
    "message": "The provided file size '58100000' for the create or update operation exceeded the maximum allowed file size '52428800' using non-chunked transfer mode. Please enable chunked transfer mode to create or update large files."
  },
  "source": "sftpwithssh-eus.azconn-eus.p.azurewebsites.net"
}
This issue happens even though "Allow Chunking" property is set to "On".
 

Resolution:
Before sending the data to SFTP, create a Compose action and set its value to the previous string variable.
Add the "body" to the Compose action.

e.g.

 "Compose": {
                "inputs": {
                    "body": "@variables('sendtosftp')"
                },
                "runAfter": {
                    "Until": [
                        "Succeeded"
                    ]
                },
                "type": "Compose"
            },
            "Create_file": {
                "inputs": {
                    "body": "@body('Compose')",
Updated Dec 16, 2020
Version 2.0

4 Comments

  • toddob's avatar
    toddob
    Copper Contributor

    Explicitly in code view adding all of the text including the 'body' element results in success.

    Do you want me to edit my first comment so anyone who comes across this doesn't think it will not work? I'm open to deleting it wholesale.

  • toddob's avatar
    toddob
    Copper Contributor

    No, we assumed that 'body' was the name of the Input that was being stored by the action. We will re-test and explicitly turn to the Code View. Thank you for the pointer. We' will let you know our results. Perhaps this could be edited to be more explicit.

  • "First, as of Dec 2021 the reference to body('Compose') is an empty string,"  => Did you add body to the Compose action in the code view? By default it is not present.

  • toddob's avatar
    toddob
    Copper Contributor

    For anyone else who comes across this, this workaround did not fix the issue we face.

    • First, as of Dec 2021 the reference to body('Compose') is an empty string, so an SFTP-SSH Create File succeeds but because it has to write nothing. The appropriate reference should be output('Compose') which returned our 75MB plus content, but resulted in the same error "...exceeded the maximum...
    • Second, but it should not make a difference, our source for content is not a string variable, but rather in a reference to the content of an AS2 Decode action. We assigned it to the Inputs of the Compose using base64ToString(body('Decode_AS2_message')?['AS2Message']?['Content']). We had to wrap it in the base64 to string otherwise the resulting SFTP-SSH file is written out as base64 encoded.
    • Third, just to check if the detail that the source for content is a string, we added a string variable and assigned the AS2 Decode content to it as shown above, then assigned the string to the Compose shape, etc.
    Net: This made no difference. The error still occurs. It is not a fix for this error.