Explaining slow performance resolving artifacts

When you request maven-metadata.xml files from a group repository, Nexus needs to traverse all of the contained repositories. This is because the same GA or GAV may exist in multiple repositories. And if it does, all of the metadata files must be merged together.

In hosted repositories this is a cheap operation, so Nexus will always look for these files. In proxy repositories this can be quite expensive, since Nexus needs to go remote. To prevent poor performance Nexus caches previous responses. How long it caches these is determined by two settings:

Metadata Max Age: How often to look for updates
Item Not Found TTL: How often to check for files which were not previously found.

Both of these default to 24 hours.

If you lower these timeouts you will receive more frequent updates, but at the expense of performance. Adding good routing rules can help considerably with this:


However, there are cases where the only reasonable value for these is zero. Typically, this will be proxy repositories whose remotes contain snapshots. In this case there isn't really a good way to solve this problem using Nexus OSS edition.

If using Nexus Professional is an option you can solve this problem very effectively by setting up smart proxy communication between the two instances. See here for an explanation of this:


Have more questions? Submit a request


Article is closed for comments.