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

Node.js Azure Function的Azure DevOps Pipeline随机失败求助

Node.js Azure Function部署随机失败问题

我用Node.js编写的Azure Function,对应的Azure DevOps Pipeline部署会随机失败,大概每5次部署就有3次失败,报错信息如下:

Deployment has been stopped due to SCM container restart. The restart can happen due to a management operation on site. Do not perform a management operation and a deployment operation in quick succession. Adding a small delay can help avoid any conflicts.

补充信息:

  • 近期围绕报表生成用的Puppeteer做了代码修改,无法提供具体代码;
  • Puppeteer版本为"puppeteer": "^21.3.1";
  • 当前Pipeline步骤如下:
steps:
- task: PowerShell@2
  inputs:
    targetType: 'inline'
    script: |
      New-Item -Path $(Build.SourcesDirectory)/.deployment -ItemType File
      '[config] SCM_DO_BUILD_DURING_DEPLOYMENT = true' | out-file -filepath $(Build.SourcesDirectory)/.deployment
- task: ArchiveFiles@2
  displayName: 'Zip source'
  inputs:
    rootFolderOrFile: '$(Build.SourcesDirectory)'
    includeRootFolder: false
    archiveType: 'zip'
    archiveFile: '$(Build.ArtifactStagingDirectory)/source.zip'
    replaceExistingArchive: true
- task: PublishBuildArtifacts@1
  displayName: 'Publish zip'
  inputs:
    PathtoPublish: '$(Build.ArtifactStagingDirectory)/source.zip'
    ArtifactName: 'report-source'
    publishLocation: 'Container'

已尝试的解决操作:

  • 在Function App配置中添加WEBSITES_CONTAINER_START_TIME_LIMIT:1800,无改善;
  • 在DevOps Release发布步骤前添加30秒等待任务,无改善。

内容的提问来源于stack exchange,提问作者Cata Hotea

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.09 13:52:04