Category Archives: Azure

Azure App Service release hangs and then fails

We got a hazardous deployment on Azure: in every 4-5th release the pipeline timed out after 60 minutes of waiting for Azure. First we suspected Azure services, as the script was hanging on their API call, but there was no outage report. Tried to investigate other deployments when this one failed, but every other worked just fine. Searching Microsoft’s wiki gave the answer:

A release hangs for a long time and then fails, a “503 service unavailable” error occurs, or the deployment history in the deployment logs fails to update

It turned out that the App Service Plan was hosting multiple, small services which took most of the resources, making the deployment hazardous.

Increasing the App Service Plan’s tier solved our issue.

Cannot update to higher App Service tiers

One of our App Services run out of memory couple of times so we decided to upgrade them to a higher tier, P3mv3 was our target. We checked the availability on Azure, everything seemed to be OK, but the tier wasn’t listed under “Scale up” blade of the App Service Plan:

We rechecked the VM’s availability using CLI, it gave the same result: the tier should be shown.

Decided to give a try to the Azure CLI and upgrade through it, but no luck:

Error when upgrading through Azure CLI

Finally we contacted Azure support to help us out, but their answer wasn’t promising: our Resource Group is too old and doesn’t support the needed VM. Meaning we had to recreate our Resource Group to be able to use higher tier App Services.

With the new Resource Group we were able to scale out.

Check availability of App Service Plan in your region

Let’s say you want to upgrade your App Service Plan to a higher tier but first you want to check which regions support the given VM size. You can click through the Azure website for that information or you can use the Azure CLI.

az appservice list-locations --sku P5mv3

The code above gets which regions have P5mv3 VMs. To look for SKU-s, you can visit Azure’s App Service Plan pricing page.

Azure App Service still logging when stopped

Encountered a mysterious issue these days: stopped the App Service on Azure, but the application was still logging, like nothing happened. Waiting couple of minutes, then half an hour, but logs were still coming.

Azure App Service stop

Checked the generated url and the site responded as it should:

Error 403 - Site is stopped

Turned out, that the App Service was hosting WebJobs, not a classic web app and the default “Stop” doesn’t apply to them. To turn off WebJobs, one need to navigate to WebJobs blade of the App Service.