I have an Azure Website which is deployed automatically by our GitLab server. Compared to other projects we deploy with the same scripts, this one takes a really long time do deploy (15-20 minutes). Other projects are usually deployed within 1-2 minutes. (Given approximately the same amount of modifications.)
The step which takes most of the time is Handling Basic Web Site deployment
. All other steps are finished within seconds.
The log after git push
to Azure looks like this (timestamps from the SCM site added by me):
[2016-08-25T07:42:15.6465159Z] remote: Updating branch 'master'.
[2016-08-25T07:42:18.2159075Z] remote: Updating submodules.
[2016-08-25T07:42:18.2783580Z] remote: Preparing deployment for commit id '2a71d1ddd3'.
[2016-08-25T07:42:18.6221285Z] remote: Generating deployment script.
[2016-08-25T07:42:18.7658033Z] remote: Running deployment command...
[2016-08-25T07:42:19.8283917Z] remote: Handling Basic Web Site deployment.
[ ] remote: ..... [1051 dots here]
[2016-08-25T08:00:12.4710682Z] remote: KuduSync.NET from: 'D:\home\site\repository' to: 'D:\home\site\wwwroot'
[2016-08-25T08:00:12.5492017Z] remote: Copying file: '[first file]'
[2016-08-25T08:00:12.7054553Z] remote: Copying file: '[last file]'
[2016-08-25T08:00:12.7210814Z] remote: Finished successfully.
[2016-08-25T08:00:12.8492401Z] remote: Running post deployment command(s)...
[2016-08-25T08:00:13.0805168Z] remote: Deployment successful.
I have no idea what is causing this massive delay. Also, the delay is never the same, it varies by a few minutes.
Since I don't know which information is important and I can't post all information about our project or the Azure Web Site here, please ask for what you need to help me, and I'll edit my question to provide the necessary information.
The root of the problem is that you have an extremely large number of files under your D:\home\site\wwwroot\app_data
folders. Looks like several hundreds of thousands!
They are named something like error-2015-02-22235701Z-2ab04577-57f6-43cb-b09a-cc71e354e2f2.xml
. Many are very old, going back to 2014.
Given that you probably don't need these files, try the following:
D:\home\site\wwwroot
. Don't try to go into App_Data, as the number of files will cause it to hang.del App_Data\error*.xml
Expect it to take a very long time! One way to check that it's making progress is to open another Kudu Console instance (in another tab), go to D:\home
and just run dir
, which tells you how much space is left. That should be going up.
And obviously, you'll need to look into what's causing these files to be created in the first place, so it doesn't keep happening.