Monday, May 21, 2012

Issue: Nexus is too slow in downloading pom files

Recently our nexus open source [1.5] version became too slow in downloading .pom files. It worked well for years, but it starting taking more than 2 mins to download a .pom file of size 422 Bytes. But it used download few files faster. Manually we could have downloaded the same file either using browser, wget or curl in fractions of seconds. But artifact download through maven got affected badly.

We new the changes happened in our network. Our nexus host machine got moved to a restricted network, where access to internet was blocked. Finally we nailed down the issue is either maven/nexus is trying to contact external public repositories for updates for each download and slowing down things.


Issue resolution: Re-order group repositories.

By default with nexus installation, we had “Maven central” in top of public repositories.
Since Maven central is blocked in our network, nexus got slowed down.
Now I put our own hosted repositories on top of the “Ordered Group repositories”.
Now every search for artifact is getting matched in our local repository, instead of going external network and hence download got faster now.


Login to Nexus -> Public Repositories -> 





2 comments:

Sniglom said...

Thank you. This cut our build time in less than half for the components I tested.

I mentioned your blog in my blog post.

Here is the official instructions from Sonatype:
http://books.sonatype.com/nexus-book/reference/confignx-sect-managing-groups.html

Kind regards

Anonymous said...

Is there any update to this? Since I experience the same issue. Thank you.