PIPELINE_STAGE_TIMEOUT
cicd
runtime_error
ai_generated
true
流水线在60分钟后超时。阶段 'Deploy' 超过了 Jenkinsfile 中设置的超时限制。
org.jenkinsci.plugins.workflow.steps.FlowInterruptedException: The pipeline timed out after 60 minutes. Stage 'Deploy' exceeded the timeout limit set in the Jenkinsfile.
ID: cicd/jenkins-pipeline-stage-timeout
85%修复率
83%置信度
1证据数
2024-05-12首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| Jenkins 2.440 | active | — | — | — |
| Jenkins 2.450 | active | — | — | — |
| Declarative Pipeline 1.9.3 | active | — | — | — |
根因分析
Jenkins 流水线阶段配置了超时时间(例如通过 timeout() 步骤),该时间短于阶段的实际执行时间,通常由于长时间运行的部署脚本或资源争用。
English
A Jenkins pipeline stage has a timeout configured (e.g., via timeout() step) that is shorter than the actual execution time of the stage, often due to long-running deployment scripts or resource contention.
官方文档
https://www.jenkins.io/doc/book/pipeline/syntax/#timeout解决方案
-
Increase the timeout value for the specific stage in the Jenkinsfile, e.g., from 60 to 120 minutes, by modifying the timeout() step.
-
Optimize the stage script to run faster by parallelizing tasks or reducing resource-intensive operations, such as using parallel() for independent deployment steps.
-
Remove the timeout entirely for the stage if it is not critical, but add a timeout at the pipeline level as a safety net.
无效尝试
常见但无效的做法:
-
80% 失败
The timeout is defined in the pipeline code, not in the Jenkins server configuration.
-
85% 失败
Pipeline-level timeouts take precedence over global settings.
-
75% 失败
The timeout is a limit on execution time, not a space or cache issue.