为什么我的 Azure DevOps 迁移会在几个小时后超时?
Why is my Azure DevOps Migration timing out after several hours?
我有一个很长的 运行ning 迁移(不要问)被 AzureDevOps 发布管道运行。
具体来说,它是一个“Azure SQL 数据库部署”activity,运行宁一个“SQL 脚本文件”部署类型。
尽管在 Invoke-Sql Additional Parameters 设置中配置了所有超时的最大值,但我的迁移仍然超时。
具体来说,我得到:
We stopped hearing from agent Hosted Agent. Verify the agent machine is running and has a healthy network connection. Anything that terminates an agent process, starves it for CPU, or blocks its network access can cause this error.
到目前为止超时时间:
- 6:13:15
- 6:13:18
- 6:14:41
- 6:10:19
所以“6 个多小时后”。大约 22,400 秒,这看起来也不像任何明显的数字:)
为什么?我该如何解决?
事实证明,AzureDevOps 使用托管代理来执行管道中的每个任务,并且这些代理具有固有的生命周期,独立于它们运行正在执行的任何任务。
A pipeline may run for a long time and then fail due to job time-out. Job timeout closely depends on the agent being used. Free Microsoft hosted agents have a max timeout of 60 minutes per job for a private repository and 360 minutes for a public repository. To increase the max timeout for a job, you can opt for any of the following.
- Buy a Microsoft hosted agent which will give you 360 minutes for all jobs, irrespective of the repository used
- Use a self-hosted agent to rule out any timeout issues due to the agent
Learn more about job timeout.
所以我达到了“360 分钟”的限制(大概他们给了你一点额外的时间,所以没有人抱怨?)。
解决方案是使用自托管代理。 (或者在 6 小时内完成我的迁移 运行,当然)
我有一个很长的 运行ning 迁移(不要问)被 AzureDevOps 发布管道运行。 具体来说,它是一个“Azure SQL 数据库部署”activity,运行宁一个“SQL 脚本文件”部署类型。
尽管在 Invoke-Sql Additional Parameters 设置中配置了所有超时的最大值,但我的迁移仍然超时。
具体来说,我得到:
We stopped hearing from agent Hosted Agent. Verify the agent machine is running and has a healthy network connection. Anything that terminates an agent process, starves it for CPU, or blocks its network access can cause this error.
到目前为止超时时间:
- 6:13:15
- 6:13:18
- 6:14:41
- 6:10:19
所以“6 个多小时后”。大约 22,400 秒,这看起来也不像任何明显的数字:)
为什么?我该如何解决?
事实证明,AzureDevOps 使用托管代理来执行管道中的每个任务,并且这些代理具有固有的生命周期,独立于它们运行正在执行的任何任务。
A pipeline may run for a long time and then fail due to job time-out. Job timeout closely depends on the agent being used. Free Microsoft hosted agents have a max timeout of 60 minutes per job for a private repository and 360 minutes for a public repository. To increase the max timeout for a job, you can opt for any of the following.
- Buy a Microsoft hosted agent which will give you 360 minutes for all jobs, irrespective of the repository used
- Use a self-hosted agent to rule out any timeout issues due to the agent Learn more about job timeout.
所以我达到了“360 分钟”的限制(大概他们给了你一点额外的时间,所以没有人抱怨?)。
解决方案是使用自托管代理。 (或者在 6 小时内完成我的迁移 运行,当然)