kudu: app_offline.htm file not being consistently removed by Kudu

We started noticing a couple weeks ago that occasionally the app_offline.htm file is not being removed at the end of the Kudu process. This results in the site remaining offline with a 503 Site under construction error.

We mentioned it over at https://github.com/Azure/app-service-announcements/issues/137 and several other people chimed in they were seeing it as well.

The issue is not happening consistently, but it is happening fairly regularly for us (~20% of the time). We’ve temporarily disabled auto-swap and are manually checking for the app_offline.htm file after a deploy, manually deleting it when present and proceeding with a swap.

Please let me know what information you would like for me to provide (the template didn’t seem completely applicable) and thanks for any help you can offer!

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 14
  • Comments: 30 (10 by maintainers)

Most upvoted comments

Are there any updates on this? This is causing major issues for us every time we deploy our .net core production site. We’ve tried deploying from VS for mac, VS for windows, and through Devops (including swapping slots) and every time we have this issue. MS support is recommending we set SCM_CREATE_APP_OFFLINE to 0. But as mentioned in the initial post here https://github.com/Azure/app-service-announcements/issues/137, this seems like it could have issues of its own? Also, we’re having issues where changing an App Setting is causing the site to be temporarily unavailable. Is this related as well?

FWIW we haven’t seen the issue this week, so we’re going back to auto-swap for production. I’d like to leave this issue open since others have seen it too in case anybody else can offer the request from suwatch to see a site that is actively in that state. I’ll certainly come back to report it when/if we next see the issue.

We will investigate and update …

@ahmelsayed, @suwatch, can we take a look at this? We also received a CRI about this and multiple customers have experienced it.

@ankitkumarr This happened for me today. Azure App Service, fl-cc-am-beta.azurewebsites.net. Deployed through CI/CD for years at this point w/o issue. Last update on CI pipeline was 5/21/21, and the last release (ran as part of PR check) did fail w/ ERROR_FILE_IN_USE. Kudu build 94.30524.5227.0, so maybe this was left over when the deployment failed?

@ankitkumarr I am seeing this issue still on an Azure Functions app being deployed through ADO with the “Take app offline” box selected. The Kudu version is currently 85.11226.4297.0.

Our setup is to deploy to a slot, then swap the slots.

The fix for this is completed and merged in. The release will be starting this week and should be deployed by the end of next week. Thank you all for your patience.

The app_offline creation and removal is part of KuduSync.Net. It is supposedly removed after we are done with deploying bit to destination. You can opt out by setting appSettings SCM_CREATE_APP_OFFLINE=0.

We are interested to see why it was left there. Do provide us the UTC time of incident and webapp, we can help taking a look. @ankitkumarr for fyi.