Currently, we are seeing longer and longer deployment times, when deploying our web app, using Azure DevOps. When we have a fresh deployment slot, our deployment goes through without issues, but over time, the webdeploy step, takes longer and longer (starting from 3 mins in a fresh slot, to more than 3 hours in older slot).


We do "clean" deployments, i.e. our deployment artifact is a vanilla Sitecore CD/CM package with our code on top. The "Deploy Azure App Service" task has these settings:

  • Web Deploy
  • Take App Ofline
  • Remove additional files at destination
  • Exclude files from the App_Data folder
  • Rename locked files
  • Additional arguments: -useChecksum

This is a screenshot of our current deployment pipeline (for CM):

enter image description here

Possible solutions We are discussing the following solutions:

  • manually re-create the deployment slot when the issue arise
  • re-create the deployment slot as part of the deployment process
  • re-duce the number of files being deployed (i.e. don't deploy a clean Sitecore every time)

I have found blogposts from community members describing different approaches to deployment in general, but I have not found anyone mentioning the issue with deployment time increasing over time.

Does anyone have a working solution that targets this specific problem?

1 Answer 1


So something worth looking into with Azure deployments if you're using Web Deploy (for clean deployments) is to ensure that you handle the App_Data folder with care. For your Deploy Azure App Service Step, have a look at ticking the "ignore App_Data folder" option which will be in the settings for that task.

Azure actually dumps a huge amount of small log files into the Diagnostics folder in the App_Data folder by default. These keep piling up over time and if you're using Web Deploy with "remove files not in the deployment artifact" option enabled, it will then delete every one of those files one-by-one which is where I've seen Deployment times start to spike to silly amounts of time like it sounds like you're experiencing.

Worth checking that one - I've starting just opting to ignore the App_Data folder entirely during releases as you can work around that easily enough.

  • Thanks for the advice! Unfortunately we are already using that option. In the question I labelled it "Exclude files from the App_Data folder"
    – Hos
    Commented Nov 27, 2019 at 11:06
  • Fair enough, are you able to turn on diagnostic logging or something to see which part is taking all the time? Commented Nov 28, 2019 at 22:25
  • We did some further digging (enabling 'system.debug=true') and it seems there is something wrong with the webdeploy package. Azure DevOps just stops responding (i.e. no console output for hours). We tried to change to zipdeploy and that helped, so I guess its the webdeploy package being wrongly created. Thank you for your input!
    – Hos
    Commented Nov 29, 2019 at 6:26
  • Glad you got to the bottom of it :) Commented Dec 1, 2019 at 23:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.