gpt4 book ai didi

Azure 应用服务在 ARM 模板部署期间暂时不可用。即使我们使用应用程序暂存槽

转载 作者:行者123 更新时间:2023-12-03 03:48:04 29 4
gpt4 key购买 nike

我们有一个 Azure DevOps 发布管道,并以 ARM 模板部署作为每个版本的开始。我们这样做是为了确保我们的 Azure 资源与存储库中配置的 ARM 模板保持同步。我们观察到 azure 应用程序服务在 Arm 部署时返回 HTTP 503 然后我们引入应用程序槽并在其中添加所有应用程序设置,并从 azure 应用程序中删除应用程序设置。我们将应用程序暂存槽部署为单独的资源,然后与主槽交换,然后所有应用程序设置在槽之间交换我们的期望是在 Arm 部署期间停止 Web 应用程序不可用的时间,但即使我们使用配置部署应用程序槽,主槽也会在一段时间内处于不可用状态。插槽之间的交换无需停机即可进行。事情就是这样发生的吗?或者Arm​​出了什么问题?这就是我们配置 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"
}
}
},

插槽配置方式如下

    {
"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"
}
}

最佳答案

我不会将 ARM 视为原因,而是专注于对您收到的 503 错误进行故障排除。

这些可能是由多种事件引起的,例如应用程序崩溃(代码中是否存在导致首次加载时崩溃的错误?)、应用程序挂起或其他问题。

首先,我建议启用应用程序日志,以便您不仅可以捕获 http 错误代码,还可以捕获 http 子状态代码。使用下面的子状态代码列表来查看发生了什么。或者,请回复此帖子并附上您的 503 错误子状态代码,以便我们提供进一步帮助。

 <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" />


关于Azure 应用服务在 ARM 模板部署期间暂时不可用。即使我们使用应用程序暂存槽,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68284465/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com