Reporting Pipeline Timeout Issues in Bitbucket Pipelines

Jam Nadeem January 9, 2025

 

 

Screenshot 2025-01-10 at 11.38.06 AM.png

 

 

Screenshot 2025-01-10 at 11.41.09 AM.pngScreenshot 2025-01-10 at 11.41.43 AM.png

 

We are encountering a timeout issue in our Bitbucket Pipelines. The pipeline is set up to trigger a Jenkins job and wait for its completion, but it times out during execution. The Jenkins job takes approximately 10 minutes to complete, and we need to increase the timeout to accommodate this. Despite using the official Jira configuration guidelines, the issue persists.

 

2 answers

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 13, 2025

Hi @Jam Nadeem,

I see in your screenshot that you use the max-time option for the step. This option sets the maximum length a step can run, but it has no effect on the timeout of the pipe.

If you set the WAIT variable for the pipe atlassian/jenkins-job-trigger, the pipe will wait for 300 seconds (5 minutes) by default. If you want the pipe to wait longer, you will need to add the variable WAIT_MAX_TIME in the pipe's definition and set it to a longer value. This is documented in the pipe's repo here:

For example, if you want the pipe to wait for 15 minutes (900 seconds), you can adjust the pipe's definition in your bitbucket-pipelines.yml file similarly to the following:

- pipe: atlassian/jenkins-job-trigger:0.10.0
variables:
JENKINS_URL: 'http://my-jenkinsio-host/job'
JENKINS_USER: $JENKINS_USER
JENKINS_TOKEN: $JENKINS_TOKEN
JOB_NAME: 'staging-awesome-project-job'
WAIT: 'true'
WAIT_MAX_TIME: 900

Please feel free to let me know how it goes and if you have any questions!

Kind regards,
Theodora

0 votes
Sahir Maharaj
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 12, 2025

Hello @Jam Nadeem

To resolve timeout issues in Bitbucket Pipelines, ensure your pipeline configuration allows sufficient time for Jenkins jobs to complete. Bitbucket provides a timeout parameter for steps, which you can adjust to accommodate longer-running processes.

For instance, you can increase the timeout value under the pipeline step where Jenkins is triggered. Make sure the Jenkins job itself is optimized to avoid unnecessary delays.

If increasing the timeout doesn’t work, check the connectivity between Bitbucket and Jenkins, as network or configuration issues might cause interruptions.

If the problem persists, it could be worth contacting Atlassian support at https://support.atlassian.com/contact/#/.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events