Bitbucket's pipeline timeout doesn't match the reported tasks time
Asked by Beatriz Zamorano:

Hello!

Problem: Our pipelines are timing out therefore failing.

There seems to be a discrepancy for the reported time for each task, versus what the whole pipeline is actually telling (the pipeline time is much larger than the tasks total time).

Has there been any bitbucket issues related to this?

Thank you. ![Screen Shot 2023-06-19 at 11.50.38.png](/t5/image/serverpage/image-id/263932i60708375DBEC0ADC/image-size/large?v=v2&px=999 "Screen Shot 2023-06-19 at 11.50.38.png")


Answers:
author: Theodora Boudale
body: Hi Beatriz and welcome to the community!

The time that you see next to each command gets updated when there is output from that command. The reason that you see 5m 30s is because the command gave no additional output after that time and until the step exceeded the max-time limit.

Kind regards,  
Theodora

comments: author: Yas.Bravo
body: Hello Theodora  

Thanks for tha information. We are running our tests with Testcafe and it seems the process gets stuck when we enable the the flags to take screenshots and videos on fails. It worked fine with - Chrome 113.0.5672.63 / Ubuntu 20.04 until two weeks ago and then started to behave like this. We can confirm our code and scrips remained the same. Also tested with the same image and parameters locally with docker build and it worked fine.  
This issue does not happens if the srcipt is executed using a self-hosted runner so all things point to that there is an issue with the docker images in the Bitbucket build in runner.  

Thanks


author: Theodora Boudale
body: Hi Yas,

Thank you for reaching out.

You mentioned that you tested with the same image and parameters locally with docker build and it worked fine. Can you please confirm if you debugged locally as per the following guide?

* <https://confluence.atlassian.com/bbkb/debug-pipelines-locally-with-docker-1167698072.html>

You also mentioned that the issue does not occur with a self-hosted runner. Did you use a Linux Docker runner for this step and if so, did you use the same Docker image as a build container for this step with the self-hosted runner?

We would need to check the build logs in order to further troubleshoot this, specifically:

* the build log of the failed step in Pipelines
* the build log of the step in the self-hosted runner
* the output of the commands when debugging the build locally with Docker

If you don't feel comfortable sharing that here, you can create a ticket with the support team. The ticket will be visible to you, Atlassian staff, and any users you may want to add as participants. If we have a support ticket open, the engineer working on it will be able to access the build logs and troubleshooting should be faster.

You can create a ticket via <https://support.atlassian.com/contact/#/>, in "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product. Please make sure to provide the workspace ID of the workspace where the repo belongs.

It would be helpful if you could also provide in the ticket an answer to the questions I asked above and

* the URL of the failed step in Pipelines
* the URL of the step in the self-hosted runner
* the output of the commands when debugging the build locally with Docker

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud