1
votes

We have an Azure DevOps release pipeline with an ARM template deployment as the start of each release. We do this to make sure our Azure resource stays in sync with the ARM template configured in our repository. We observed the azure app service Return HTTP 503 while arm deployment Then we introduce app slot and add all app setting’s there and remove app setting from azure app. We deploy app staging slot as separate resource and then swap with primary slot then all app setting swap between slot Our expectation is to stop web app unavailable time during arm deployment but even we deploy app slot with configurations, primary slot went to unavailable state for some time. swap between slot happen without down time. Is this the way it happening? or something wrong with Arm? This how we configured the arm

{
     "apiVersion": "2016-08-01",
        "name": "xxnamexx",
        "type": "Microsoft.Web/sites",
        "location": "xxxlocationxxx",
        "copy": {
            "name": "webSiteDeployment",
            "count": "2"
        },
        "dependsOn": [
            "servicepalnxxx",
            "identityproviderxxx"
        ],
        "tags": {
            
            "displayName": "Website"
        },
        "identity": {
            "type": "UserAssigned",
            "userAssignedIdentities": {
            "": {}
            }
        },
        "properties": {
            "name": "namexxx",
            "webSocketsEnabled": true,
            "clientAffinityEnabled": false,
            "httpsOnly": true,
            "serverFarmId": "servicepalnxxx",
            "netFrameworkVersion": "v5.0",
            "siteConfig": {
                "http20Enabled": true,
                "minTlsVersion": "1.2"
            }
        }
},

this how slot configured

    {
        "apiVersion": "2016-08-01",
        "type": "Microsoft.Web/sites/slots",
        "name": "namexxx",
        "kind": "app",
        "location": "xxxlocationxxx",
        "comments": "This specifies the web app slots.",
        "tags": {
            "displayName": "WebAppSlots"
        },
        "identity": {
            "type": "UserAssigned",
            "userAssignedIdentities": {
                "": {}
            }
        },
        "properties": {
            "serverFarmId": "serviceplan"
        },
        "dependsOn": [
            "webapp"
        ],

        "resources": [
            {
            "name": "appsettings",
            "type": "config",
            "apiVersion": "2016-08-01",
            "dependsOn": [
                 "depend onslot"
                 ],
            "tags": {
                    "displayName": "appSetting"
                },     
            "properties": {
                "name": "value",
                "name": "value",
                "name": "value"
              }   
            }
        ],
        "copy": {
            "name": "webSiteDeployment",
            "count": "2"
        }
    }
1

1 Answers

0
votes

Rather than looking at ARM as being the cause, I would focus on troubleshooting the 503 errors that you are receiving.

These can be caused by a number of events such as your application crashing (is there a bug in your code that's causing it to crash upon first load?), the application hanging, or other issues.

To start, I would suggest enabling the application logs so you can capture not only the http error code but also the http sub status code. Use the below list of substatus codes to see what is going on. Alternatively, reply back to this post with your substatus code for 503 errors so we can assist further.

 <httpsubStatus>
    <error id ="0" description="Server unavailable" />
    <error id ="2" description="Concurrent requests limit reached." />
    <error id ="3" description="ASP.NET queue full" />
    <error id ="4" description="FastCGI queue full" />
    <error id ="12" description="WebSocket request made for site with websocket disabled."     />
    <error id ="13" description="Number of active WebSocket requests has reached the maximum concurrent WebSocket requests allowed." />
    <!-- Request throttler events -->
    <error id ="28" description="Front End Request throttler queue full" />
    <error id ="29" description="Front End Request throttler (empty site)" />
    <error id ="30" description="Front End Request throttler (client disconnect)" />
    <error id ="31" description="Front End Request throttler hot site blocked" />
    <!-- Antares Rewrite provider codes-->
    <error id ="64" description="Exception in rewrite provider (probably SQL)" />
    <error id ="65" description="Servers unavailable" />
    <error id ="66" description="Generic Error" />
    <error id ="69" description="app service plan is Scaling" />
    <error id ="70" description="Site Routed To Incorrect Worker" />
    <error id ="71" description="Function Scale Out" />
    <!-- iisnode -->
    <error id ="1000" description="ERROR_NOT_ENOUGH_QUOTA: OnExecuteRequestHandler" />
    <error id ="1001" description="iisnode failed to accept a request because the application is recycling" />
    <error id ="1002" description="iisnode failed to initiate processing of a request" />
    <error id ="1003" description="iisnode was unable to establish named pipe connection to the node.exe process because the named pipe server is too busy" />