Intermittant issue with app service slot autoswaps and warmup

Alastair 131 Reputation points
2020-08-12T10:31:09.17+00:00

I am experiencing an intermittent issue with app service deployment slots and warm-ups.

Every day we create a new app service plan, app service, and a deployment slot in North Europe region. The slot is configured with the auto swap feature enabled. Although we have not changed our code, a couple of weeks ago we started experiencing an intermittent issue suggesting something may have changed within app service as it was working reliably beforehand.

We create the infrastructure and then deploy to the slot using zip deploy. Autoswap starts and we poll the status API. Occasionally like today we are given an app service plan where all app services will fail to slot swap because the swap warmup always fails no matter what we do. The slot is configured with app settings WEBSITE_SWAP_WARMUP_PING_PATH = "/api/healthcheck" and WEBSITE_SWAP_WARMUP_PING_STATUSES="200" and even though that API is returning a 200 code the warm up always fails for all app services on that plan.

The error is
"Failed swapping site. Error: Cannot swap slots for site XXX because the application initialization in 'XXX' slot either took too long or failed. Please check AppInit module configuration or try using swap with preview if application initialization time is very long. "

However, we are certain the warm up returned a 200 status and no sites on that plan will succeed for a slot swap if WEBSITE_SWAP_WARMUP_PING_PATH is configured. If you remove the WEBSITE_SWAP_WARMUP_PING_PATH setting then the slot swap will succeed, (but the app does not get warmed up!)

The only workaround is to destroy the app service plan and recreate everything, whereby usually the deploy and slot swap with warmup will start working again.

Is it possible there is a bug in app service?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,910 questions
{count} votes

Accepted answer
  1. Alastair 131 Reputation points
    2020-08-25T16:20:41.577+00:00

    This has been acknowledged as a bug in App Service by MS support and "will be rolled out in next release cycle (tentatively)."

    1 person found this answer helpful.

5 additional answers

Sort by: Most helpful
  1. Sean Gannon 0 Reputation points Microsoft Employee
    2024-02-12T21:20:27.9966667+00:00

    This is still an issue on version 101.0.7.520, is there any update? This has been ongoing for years at this point?

    0 comments No comments