cicd
runtime_error
ai_generated
true
org.jenkinsci.plugins.workflow.steps.FlowInterruptedException:流水线在 60 分钟后超时
org.jenkinsci.plugins.workflow.steps.FlowInterruptedException: The pipeline timed out after 60 minutes
ID: cicd/jenkins-pipeline-timeout
90%修复率
88%置信度
1证据数
2023-08-10首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| Jenkins 2.346+ | active | — | — | — |
| Pipeline: Declarative 1.8.5+ | active | — | — | — |
| Pipeline: Groovy 2.9+ | active | — | — | — |
根因分析
Jenkins 流水线阶段或整个流水线超过了配置的超时限制,导致构建被中止。
English
A Jenkins pipeline stage or the entire pipeline exceeded the configured timeout limit, causing the build to be aborted.
官方文档
https://www.jenkins.io/doc/book/pipeline/syntax/#options解决方案
-
Increase the timeout in the Jenkinsfile by modifying the `options` block: `options { timeout(time: 120, unit: 'MINUTES') }` for the entire pipeline, or add `timeout(time: 30, unit: 'MINUTES')` to a specific stage. -
Optimize the pipeline to reduce execution time by parallelizing stages with `parallel` directive: `stage('Build and Test') { parallel { stage('Build') { ... } stage('Test') { ... } } }`
无效尝试
常见但无效的做法:
-
Removing the timeout option entirely from the Jenkinsfile
30% 失败
Without a timeout, the pipeline can run indefinitely, consuming resources and potentially blocking the executor queue.
-
Setting the timeout to a very high value (e.g., 9999 minutes) to avoid the error
50% 失败
This masks the underlying issue (e.g., a stuck step or resource contention) and can lead to resource exhaustion.