gradle dependency download terribly slow


I'm running bamboo cloud and starting my gradle build like this with a script task

chmod +x gradlew
./gradlew clean build

This works, but the resolution of my depencencies is very slow. the network on the other hand is fast (4MB/sec)

but my log says otherwise for jars of less than a megabyte.

My image configuration

Ubuntu: EBS x86_64 (Ubuntu) (stock image) (disabled)ami-5be8f232No EBSM3 General Purpose Medium

This is the logging from bamboo, note the timestamps

16-Jan-2015 21:29:26Download
16-Jan-2015 21:33:41Download
16-Jan-2015 21:37:55Download
16-Jan-2015 21:46:24Download

Anyone seen this issue? My build runs perfectly on a server instance (but with the gradle plugin)

1 answer

Same problem here.  

If I log on to the bamboo agent and directory download a large dependency (hadoop-yarn-api, which is 1.8MB) with wget, it arrives in under 0.02 seconds.  Running gradle from the script task in Bamboo, it sometimes takes several minutes.

However, I think the problem could be to do with Gradle itself, and how long it takes to resolve dependencies.

Have you tried adding the --profile switch to your gradle command, and then creating a new artifact that saves the report (usually it's un build/reports/profile)?

Suggest an answer

Log in or Sign up to answer
Community showcase
Asked Thursday in Jira Ops

I'm John Allspaw, Ask Me Anything about incident analysis and postmortems

I'm John Allspaw, co-founder of   Adaptive Capacity Labs, where we help teams use their incidents to learn and improve. We bring research-driven methods and approaches to drive effective inciden...

3,321 views 8 7
View question

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you