Error: Failed to upload file 'site/wwwroot/app_offline.htm from Kudu. Error: Conflict (CODE: 409)

Kabilan VK 101 Reputation points
2020-03-09T21:09:59.087+00:00

The error comes up suddenly from DevOps while deploying a web app hosted on App Service.

Detailed Error Description:
2020-03-09T13:02:00.7972664Z ##[error]Failed to deploy web package to App Service.
2020-03-09T13:02:00.7981811Z ##[error]Error: Error: Failed to upload file 'site/wwwroot/app_offline.htm from Kudu. Error: Conflict (CODE: 409)
2020-03-09T13:02:01.1753803Z ##[warning]Error: Failed to update deployment history. Error: Internal Server Error (CODE: 500)

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,913 questions
0 comments No comments
{count} votes

Accepted answer
  1. Kabilan VK 101 Reputation points
    2020-03-09T21:15:50.723+00:00

    The error is because of the app service's ASP is out of quotas.
    In my case, its 60GB threshold and 59 GB occupied. I deleted the major consumer app and recreated it and its started working.

    4073-app-dev-quotas-microsoft-azure.png

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. ajkuma 26,721 Reputation points Microsoft Employee
    2020-03-11T11:24:04.147+00:00

    @Kabilan VK , Yes, applications hosted in a free or shared App Service plan are subject to usage quotas. If any quota is exceeded the site will be stopped until that quota resets.

    Quotas for Free or Shared apps are:

    1. CPU(Short): Amount of CPU allowed for this application in a 5-minute interval. This quota resets every five minutes.
    2. CPU(Day): Total amount of CPU allowed for this application in a day.

    This quota resets every 24 hours at midnight UTC. So, irrespective of the CPU percentage, its 60 minutes/day.
    Also, 3. Memory, 4. Bandwidth and 5. Filesystem

    Additionally, if you're using Azure DevOps with the v4 version of the Web Deploy tasks it may be defaulting to run from package which puts the wwwroot directory in a read only state. Kindly checkout the documents below which details about the run from package and the V4 version of the task.

    Run from package : https://learn.microsoft.com/en-us/azure/azure-functions/run-functions-from-deployment-package

    Dev Ops V4 Web Deploy task details : https://learn.microsoft.com/en-us/azure/azure-functions/run-functions-from-deployment-package

    By default the task tries to select the appropriate deployment technology given the input package, app service type and agent OS.

    Furthermore, please review the document on how to deal with locked files, which could also be the reason for the error code- https://github.com/projectkudu/kudu/wiki/Dealing-with-locked-files-during-deployment#for-msdeploy-try-enabling-app-offline

    Thanks for the follow-up & sharing the solution that worked for you. Kindly let us know if you need any further assistance on this topic, we will be more than happy to assist you further.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.