You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using lockable resources in Jenkins pipelines with a timeout set, there is a potential issue with pipelines timing out due to the queue wait time. Specifically:
There is a single lockable resource, e.g., LOCK_0.
Two pipelines, PIPELINE_A and PIPELINE_B, are competing to acquire LOCK_0.
Both pipelines have a timeout set to 12 hours.
PIPELINE_A acquires LOCK_0 and runs for 10 hours.
After PIPELINE_A finishes, PIPELINE_B starts, but it has been waiting in the queue for 10 hours.
PIPELINE_B needs more than 2 hours to complete, which exceeds the remaining timeout.
The issue here is that PIPELINE_B times out due to the queue wait time, even though its actual execution time would have been within the timeout period.
Proposed Solutions
Is there a way to exclude the queue wait time from the timeout calculation?
Are there any existing workarounds to handle this scenario?
If not, could this be considered as a feature request?
Thanks!
Upstream changes
No response
Are you interested in contributing this feature?
No response
The text was updated successfully, but these errors were encountered:
Zhenye-Na
changed the title
Exclude queuing time from pipeline timeout
Jenkins Pipeline Timeout Handling for Queue Wait Time
Jan 9, 2025
What feature do you want to see added?
Problem Description
When using lockable resources in Jenkins pipelines with a timeout set, there is a potential issue with pipelines timing out due to the queue wait time. Specifically:
LOCK_0
.PIPELINE_A
andPIPELINE_B
, are competing to acquireLOCK_0
.PIPELINE_A
acquiresLOCK_0
and runs for 10 hours.PIPELINE_A
finishes,PIPELINE_B
starts, but it has been waiting in the queue for 10 hours.PIPELINE_B
needs more than 2 hours to complete, which exceeds the remaining timeout.The issue here is that
PIPELINE_B
times out due to the queue wait time, even though its actual execution time would have been within the timeout period.Proposed Solutions
Thanks!
Upstream changes
No response
Are you interested in contributing this feature?
No response
The text was updated successfully, but these errors were encountered: