Azure Web Apps can Incur Costs Even though they are not Running

If you are starting out on your journey of building applications in Azure, and are using the powerful Web App in App Service feature (aka Azure Web Apps), take note of the associated App Service Plan.

I had a small test Web App (running in the Azure App Service) used solely to try out features of this platform.  It was consuming Azure resources and credits when it was not being utilized, so I shut it down (put it in a “Stopped” running state). I thought that would put a stop to the billing. To my surprise it was still using a significant amount of Azure resources and credits (approximately $40/mnth) even when it was shut down.

The reason for this was the default “App Service Plan” it was running under. Azure Web Apps run under an Azure “App Service Plan” (think of an app service plan as the hardware that the web app runs on). The default is a Standard Tier which uses a dedicated virtual machine and incurs costs even when it is shutdown. If you move to a Free or Shared tier it will use a shared VM, and you not incur costs when it is shut down. The dedicated resources in the Standard Tier apparently allocated an explicit slot, in a rack in the data center for the region your Web App is running in – hence it is always allocated and billed even when it is shutdown.

Here is a good definition of the App Service Plan from the Microsoft Azure App Service website:

App Service Plan

An app service plan is the hardware that a web app runs on. In the free and shared tier your web apps share an instance with other web apps. In the other tiers you have a dedicated virtual machine. It is this virtual machine that you pay for. In that case it is irrelevant whether or not you have web apps running on your app service or not, you still have a virtual machine running and you will be charged for that.

Note: you lose some capabilities under the Free and Shared plans. The capabilities and costs are detailed here:

To change the App Service Plan via the Azure RM PowerShell module, you can run the following command

Set-AzureRmAppServicePlan -ResourceGroupName $rg -Name $AppServicePlan -Tier Free

To change the App Service Plan in the Azure Web Portal do the following (this could change slightly moving forward):

  • Select your Web App tine the “All Resources” tab.
  • Under the APP SERVICE PLAN panel, select “Scale up (App Service plan)”. It is likely on one of the Standard Plans (such as S1).  Change it to the Free (F1) Plan as shown below.




Leave a Reply