Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

pipeline failing since it can not download maven repo cache

Peter Yang February 20, 2024

we have a pipeline works before ,but recently it keeps fail due to the timeout issue.

Comparing the logs , seems the previous successful build  can download the maven cache in the Build Setup step

Cache "maven: ~/.m2/repository": Downloading
Cache "maven: ~/.m2/repository": Downloaded 103.9 MiB in 6 seconds
Cache "maven: ~/.m2/repository": Extracting
Cache "maven: ~/.m2/repository": Extracted in 1 seconds
and now in the Build Setup , it has this instead, so in the pipeline it will need download all the dependency and eventually cause the pipeline failed due to timeout.
Cache "maven: ~/.m2/repository": Downloading
Cache "maven: ~/.m2/repository": Not found
anyone know why it can not download the repo cache now?

1 answer

1 vote
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 21, 2024

Hi Peter,

How much time has passed between the build where the cache was able to download and the build where the cache had failed to download?

Cheers!

- Ben (Bitbucket Cloud Support)

Peter Yang February 26, 2024

hi Ben

Thanks for replying.

when the build can download the m2 cache, it takes less than 30 mins . now since it can not download the caches, it will take 2hrs and still not finished, so it's failed with "Exceeded build time limit of 120 minutes" error message.

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 26, 2024

Hi Peter,

If there was a 7 day period between builds, the cache would have been expired and this would explain why it needed to be downloaded again fresh.

May I know how large the cache is that needs to be downloaded? Is there any chance that this could be reduced or compressed?

Cheers!

- Ben (Bitbucket Cloud Support)

Peter Yang February 26, 2024

hi Ben, 

 

Thanks for replying.  I am actually not sure how large the cache needs to be downloaded or where the cache downloads from. from our pipeline.yml file, it just configured this caches as maven , I am not sure where the cache stores

 

screenshot-pipeline.png

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 26, 2024

Hey Peter,

The cache can be found at the location below as per its default location:
~/.m2/repository 

Are you able to check the size of this location?

Cheers!

- Ben (Bitbucket Cloud Support)

 

Peter Yang February 27, 2024

hi Ben, 

I am not sure on which server should I check ~/.m2/repository , is it configured somewhere in the bitbucket settings?

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 27, 2024

Hi @Peter Yang 

This should be created in the build itself, so you should be able to check the size with the following command executed in the build:

du -sh ~/.m2/repository

If the size is similar (ie 100mb) I do not believe that cache is causing the issue entirely and may only be a small contributing factor, in which case I'd suggest reviewing our documentation for build timeouts and performing troubleshooting based on this:

Please let me know if this helps.

Cheers!

- Ben (Bitbucket Cloud Support)

 

Like Sabine Mayer likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events