PIPELINE_STAGE_TIMEOUT
cicd
runtime_error
ai_generated
true
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%Fix Rate
83%Confidence
1Evidence
2024-05-12First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| Jenkins 2.440 | active | — | — | — |
| Jenkins 2.450 | active | — | — | — |
| Declarative Pipeline 1.9.3 | active | — | — | — |
Root Cause
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.
generic中文
Jenkins 流水线阶段配置了超时时间(例如通过 timeout() 步骤),该时间短于阶段的实际执行时间,通常由于长时间运行的部署脚本或资源争用。
Official Documentation
https://www.jenkins.io/doc/book/pipeline/syntax/#timeoutWorkarounds
-
90% success Increase the timeout value for the specific stage in the Jenkinsfile, e.g., from 60 to 120 minutes, by modifying the timeout() step.
Increase the timeout value for the specific stage in the Jenkinsfile, e.g., from 60 to 120 minutes, by modifying the timeout() step.
-
80% success Optimize the stage script to run faster by parallelizing tasks or reducing resource-intensive operations, such as using parallel() for independent deployment steps.
Optimize the stage script to run faster by parallelizing tasks or reducing resource-intensive operations, such as using parallel() for independent deployment steps.
-
75% success Remove the timeout entirely for the stage if it is not critical, but add a timeout at the pipeline level as a safety net.
Remove the timeout entirely for the stage if it is not critical, but add a timeout at the pipeline level as a safety net.
中文步骤
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.
Dead Ends
Common approaches that don't work:
-
80% fail
The timeout is defined in the pipeline code, not in the Jenkins server configuration.
-
85% fail
Pipeline-level timeouts take precedence over global settings.
-
75% fail
The timeout is a limit on execution time, not a space or cache issue.