Azure Pipelines: "ran longer than the maximum time of 60 minutes"
The full message reads The job running on agent ... ran longer than the maximum time of 60 minutes. Sixty minutes is two different limits: the default job timeout, which you raise in the YAML, and the time limit of the free Microsoft-hosted job in a private project, which nothing in the YAML raises. Which one stopped your job depends on the agent and on what the organization pays for.
Which limit stopped the job
| Where the job runs | No timeoutInMinutes | timeoutInMinutes: 0 | A larger value |
|---|---|---|---|
| Self-hosted agent | 60 minutes | No limit | That value |
| Microsoft-hosted, private project, free tier | 60 minutes | 60 minutes | Still 60 minutes |
| Microsoft-hosted, paid parallel job | 60 minutes | 360 minutes | Up to 360 minutes |
- From Microsoft's pages on job timeouts and Microsoft-hosted agents: without
timeoutInMinutesa job gets 60 minutes;0means the largest limit the agent allows; on Microsoft-hosted agents a job timeout above the built-in limit has no effect. - The free tier of a private project is one parallel job of up to 60 minutes each time, until 1,800 minutes (30 hours) a month are used. A paid parallel job removes the monthly limit and lets each job run up to 360 minutes (6 hours).
- Existing public projects run Microsoft-hosted jobs for up to 360 minutes. New public projects can no longer be created, and existing ones keep their free grant until they convert to private in 2027.
When the job is a pull request's build validation, the pull request waits on it: Azure DevOps Pull Requests, a plugin for JetBrains IDEs, lists the pull request's branch policies with their state in IntelliJ IDEA, Rider or PyCharm, and with Pro runs a failed build policy again once the job fits. Its Pipelines tab (version 1.0.86 and later) lists the runs of the repositories you have open and opens a failed task's log in the editor, free to read.
Where timeoutInMinutes goes
jobs:
- job: Build
timeoutInMinutes: 120
pool:
vmImage: ubuntu-latest
steps:
- script: ./build.sh
- On the job. A
jobor adeploymentjob takestimeoutInMinutes. The most viewed question about this message (about 12,800 views) asks exactly where it goes. - Not at the top of a pipeline with only
steps:. The YAML reference listsstrategy,continueOnError,pool,container,servicesandworkspacefor that form, and no timeout. Put the steps underjobs: - job:as above. - Not on a stage. Stages have no
timeoutInMinutes; set it on each job in the stage. - On a step, it limits that step only. A task's
timeoutInMinutesstops that task, and the job's timeout still ends the job first when it is shorter. - Classic pipelines. Set the timeout on the job, or a default for all jobs on the Options tab. A nonzero value on the job wins; zero on the job takes the value from Options.
- Agentless jobs (
pool: server) also default to 60 minutes.
On the free tier
- Split the work into jobs. Each job gets its own 60 minutes. With one free parallel job they run one after the other, and every job counts against the 1,800 minutes of the month.
- Run the long part on a self-hosted agent, where
timeoutInMinutes: 0means no limit. - Buy a Microsoft-hosted parallel job for 360 minutes per job and no monthly limit (parallel jobs).
When the job usually takes much less
- The timeout starts when the job starts running; the time it waits in the queue for an agent does not count. A job that usually takes ten minutes and now reaches 60 was waiting on something inside the job: the step still running at the end of the log, and its last line, show where.
- When the agent itself stops answering, the message is different: "We stopped hearing from agent".
Similar messages
- "No hosted parallelism has been purchased or granted": the organization has no free Microsoft-hosted job at all.
- "We stopped hearing from agent": the agent was lost during the job, often for lack of memory or disk.
Azure DevOps pull requests in IntelliJ IDEA, Rider and PyCharm
Azure DevOps Pull Requests, a plugin by Lesstep for JetBrains IDEs 2024.1 or later and Android Studio, reads the organization, project and repository from your git remote and lists the pull requests that wait for your review in an IDE tool window, on Azure DevOps Services and on Azure DevOps Server. It shows the branch policies of a pull request with their state, so a required build that has not passed is next to its pull request, and with Pro you run a failed or expired build policy again from there. The review inbox is free; voting, commenting, completing and creating are Pro, with a 30-day trial.
Get it on JetBrains Marketplace
Azure DevOps and Azure Pipelines are trademarks of Microsoft Corporation; IntelliJ IDEA, Rider and PyCharm are trademarks of JetBrains s.r.o. This page is not affiliated with or endorsed by Microsoft or JetBrains.
More: all potential agents are running other requests · No hosted parallelism has been purchased or granted · We stopped hearing from agent · Build validation · 日本語