Swap with preview timeout

Tobias Høje Jacobsen 1 Reputation point
2021-05-25T21:14:39.877+00:00

Getting a "polling timout" with completing the swap. Both instances are running and warmed up during the swap.
I can't figure out an effective way to debug this. This process worked perfectly about two weeks ago, but have suddenly stopped working.

Have followed numerous tutorials talking about applicationInitialization, WEBSITE_SWAP_***, rewrite-rules to prevents https-redirection and so on.

It's weird that we can't access an official and definitive guide on how to properly set it up - I suppose its a very common requirement in most production instances.

Can you guys point me to an updated wiki, blog or something that goes into details on how to debug the process?

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

1 answer

Sort by: Most helpful
  1. Tobias Høje Jacobsen 1 Reputation point
    2021-05-26T08:22:44.673+00:00

    Thanks for getting back to me.

    The official documentation here:
    https://learn.microsoft.com/en-us/azure/app-service/deploy-staging-slots
    https://learn.microsoft.com/en-us/azure/app-service/deploy-staging-slots#troubleshoot-swaps
    And the "unofficiel" one you have linked to from the documentation as well:
    https://ruslany.net/2017/11/most-common-deployment-slot-swap-failures-and-how-to-fix-them/

    When everything was working I had the following setup

    Step 1
    Prevent HTTPS-redirection in web.config via (and other rewrite-rules)
    <add input="{WARMUP_REQUEST}" pattern="1" negate="true" />
    <add input="{REMOTE_ADDR}" pattern="^100?." negate="true" />

    Step 2
    Whitelist internal IP's from "Access Restrictions" via the portal
    100. 0.0.0/8
    10. 0.0.0/8
    127. 0.0.1/32

    Step 3
    WEBSITE_SWAP_WARMUP_PING_PATH = /warmup
    WEBSITE_SWAP_WARMUP_PING_STATUSES = 200
    WEBSITE_WARMUP_PATH = /warmup

    The warmup-endpoint does nothing currently, except being very fast to deliver a response.

    I then "swap with preview" so I can invoke a longer warmup-cycle that takes around 10-20 minutes.

    Have tried replacing step 3 with the "<applicationInitialization>"-method in the web.config. Doesn't solve the issue though.