PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, September 28, 2022

[FIXED] Why would azure be restarting website when i do a deployment slot swap?

 September 28, 2022     azure, azure-web-app-service, continuous-deployment, continuous-integration     No comments   

Issue

I've a .net 4.5 website running on Azure Websites. I've a staging deployment set up. I warm up both sites and then i run the swap process (both from azure portal and from Azure powershell). No matter what I try the swapping process restarts my websites (both) and they take about 3 minutes to boot up.

I was under the impression the deployment swapping was supposed to keep the websites "warm" and have no down time? My websites are unusuable for about 3 minutes!

As far as I can tell both production and staging slots have the same application settings etc.

Any advice or pointers would be greatly appreciated.


Solution

Jeff is right. When there are sticky app settings or connection strings defined for the slot then the website's worker process will be restarted during the swap. The sequence of actions that happen in that case is this:

  1. Apply the sticky settings from production slot to the site's worker process that is currently in staging slot. That causes the restart of worker process;
  2. Warm up the site's worker process in the staging slot by making http requests to its root URL on every VM instances where site should be running;
  3. Swap the worker processes between slots. Now the warmed up worker process is in production slot and is accepting production traffic;
  4. Apply the sticky settings from staging slot to the worker process that is currently in staging slot. At this point this is the "used to be in production" worker process. This config change causes restart of that worker process, but at that point it does not take any production traffic.


Answered By - RuslanY
Answer Checked By - Marilyn (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing