You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

执行Set-AzAppServicePlan遇Conflict错误,请求技术解决建议

解决Set-AzAppServicePlan报错"Conflict"的方案

以下是针对你遇到的Set-AzAppServicePlan返回"Conflict"错误的排查和解决步骤:

  • 检查App Service Plan是否存在并发操作
    Azure App Service Plan同一时间仅允许执行一项变更操作(如缩放、配置修改等)。如果该计划正在进行其他操作,新的变更请求会触发冲突错误。
    操作:登录Azure门户,找到目标App Service Plan,查看「活动日志」,确认没有正在运行的操作,等待现有操作完成后重试命令。

  • 验证目标Tier与当前配置的兼容性
    若你尝试降级到Shared Tier,需确保当前App Service Plan及下属Web App未使用Shared Tier不支持的功能:

    • 移除Web App的VNet集成、专用端点等Premium专属配置
    • 删除绑定的自定义域名SSL证书(Shared Tier不支持自定义SSL)
    • 卸载仅Premium Tier可用的站点扩展
  • 确认资源组和计划名称的准确性
    虽然命令中已指定名称,但仍需确认拼写无误。执行以下命令列出目标资源组下的所有App Service Plan,核对名称完全一致:

    Get-AzAppServicePlan -ResourceGroupName 'backend-lowmode-atnight'
    
  • 查看Debug输出的详细错误信息
    你已添加-Debug参数,仔细查看命令输出中的Debug日志,Azure会在其中明确说明冲突的具体原因(如资源锁定、不兼容配置等),根据提示针对性解决。

  • 尝试停止所有关联Web App后再操作
    运行中的Web App可能会阻止App Service Plan的Tier变更,可先停止所有关联应用,修改完成后再重启:

    # 获取资源组下所有Web App
    $webApps = Get-AzWebApp -ResourceGroupName 'backend-lowmode-atnight'
    # 停止所有Web App
    foreach ($app in $webApps) {
        Stop-AzWebApp -ResourceGroupName $app.ResourceGroupName -Name $app.Name
    }
    # 执行Tier变更
    Set-AzAppServicePlan -ResourceGroupName 'backend-lowmode-atnight' -Name 'backend-lowmode-atnight' -Tier "Shared" -Debug
    # 重启所有Web App(可选)
    foreach ($app in $webApps) {
        Start-AzWebApp -ResourceGroupName $app.ResourceGroupName -Name $app.Name
    }
    

内容的提问来源于stack exchange,提问作者Jaruwitt A.

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.11 11:26:15