locked
Failed to save Arm Templates RRS feed

  • Question

  • Hi,

    I am using ADF 2.0 in combination with GIT and CI/CD to deploy to other environments. After a change is made to the master (via a pull request). The change(s) needs to be published from ADF connected to git. When I publish these changes the adf_publish needs to be filled with the arm_template. But since our ADF environment is growing I get the following error:

    Generating ARM templates
    Failed to save Arm Templates. Error: {"$id":"1","innerException":null,"message":"The maximum request size of 26214400 bytes was exceeded.\r\nParameter name: contentStream","typeName":"Microsoft.TeamFoundation.SourceControl.WebServer.InvalidArgumentValueException, Microsoft.TeamFoundation.SourceControl.WebServer, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a","typeKey":"InvalidArgumentValueException","errorCode":0,"eventId":0}

    Wednesday, October 2, 2019 11:36 AM

Answers

  • I found the solution. The publish places the files into our adf_publish branch. The main adf file is greater than 26214400 bytes and gives the error. If I upload this file by hand I get the same error. So this is an Devops error. Workaround is not uploading this file. We werent using this file anyway, we where using the linked templates.
    • Marked as answer by Hans_Peeters Tuesday, October 8, 2019 6:50 AM
    Friday, October 4, 2019 1:18 PM

All replies

  • Hi

    AzureDevOps limits files sizes to less than 25MB, seems like your factory's ARM template is exceeding that limit.

    Can you look at the ARM template and see if you have large amount of text in your logic that can be shortened, say description, or resource names ?

    Also curious, how many resources do you have.

    Azure will reject any ARM template deployment of more than 1 MB. So the template will anyway be unusable, until you either do the above, or use Linked templates which are a broken down version of the main template.


    Thanks

    Ajay

    Wednesday, October 2, 2019 6:16 PM
  • Hi Ajay, thanks for the info.

    Hi Hans_Peeters, In addition to above information from Ajay, here is a thread from Developer community forum which talks about VSTS extension sizes to 25 MB limit: https://developercommunity.visualstudio.com/content/problem/292454/the-extension-package-size-exceeds-the-maximum-pac.html

    Here is document link to know more about linked templates: Using linked and nested templates when deploying Azure resources


    Thank you

    If a post helps to resolve your issue, please click the "Mark as Answer" of that post and/or click Answered"Vote as helpful" button of that post. By marking a post as Answered and/or Helpful, you help others find the answer faster.


    Wednesday, October 2, 2019 6:47 PM
  • Hi, the second thread I am already using. But that is a step later. At that moment I already have deployed the arm template to the adf_publish branch.

    For the first thread I only see that there is a solution in certain cases... souds a bit blur. But now the strange thing is. It is working today with even a bigger arm template...

    Thursday, October 3, 2019 6:51 AM
  • Hi Ajay,

    Thanks for the reply. No we almost have no comment but we have a lot of sources and a lot of logic steps in the templates. We nog have around 500+ pipelines and 500+ datasources. 1 option is to decrease the datasources. But then we need a redesign. 

    Thursday, October 3, 2019 6:53 AM
  • I found the solution. The publish places the files into our adf_publish branch. The main adf file is greater than 26214400 bytes and gives the error. If I upload this file by hand I get the same error. So this is an Devops error. Workaround is not uploading this file. We werent using this file anyway, we where using the linked templates.
    • Marked as answer by Hans_Peeters Tuesday, October 8, 2019 6:50 AM
    Friday, October 4, 2019 1:18 PM
  • Hi @Hans_Peeters,

    Glad to know you were unblocked and thanks much for sharing your findings. It will be beneficial for other members of the community who reads this thread.


    Thank you

    If a post helps to resolve your issue, please click the "Mark as Answer" of that post and/or click Answered "Vote as helpful" button of that post. By marking a post as Answered and/or Helpful, you help others find the answer faster.

    Friday, October 4, 2019 9:48 PM