If you're experiencing NuGet repository performance problems in Nexus Repo 3 there are number of things you can check.
Make sure your instance is meeting our system requirements outlined here:
Be sure to upgrade to the latest version, performance improvements have been made in newer versions.
Use NuGet v3 Protocol
If you are running Nexus Repo 3.25 or higher configure NuGet clients to retrieve components using the v3 version URL's, these are much more efficient than the old style v2 URL's.
Excessive Memory Consumption in 3.23.0 and Higher
To better support package installation via Powershell we fixed an issue in 3.23.0 where multiple versions of the same package could be identified as the "latest" (NEXUS-20349).
That fix can cause increased memory consumption when old style NuGet v2 URL's are used for package retrieval.
If you meet these conditions
- are experiencing excessive memory use related to highly active NuGet V2 API requests
- are using NXRM 3.23.0 and newer
- you can't switch to NuGet v3 for all repositories yet
- do not rely on proxying Powershell Gallery
Then you can disable the changes introduced by NEXUS-20349 by:
- upgrade to NXRM 3.25.0 or newer
$data-dir/etc/nexus.propertiesand add the following lines :
# Limit NuGet V2 API memory issues - https://support.sonatype.com/hc/en-us/articles/360054068493 nexus.nuget.allow.multiple.latest=false
The official Powershell Gallery does not offer a NuGet API v3 endpoint still as of Apr 2021, thus if you use a proxy repository to the official Powershell Gallery and also use other NuGet proxy repositories to remote NuGet API v2 endpoints, then setting this property to false may not be advisable.
Important Documentation Change April 2021
Prior to April 2021, this article documented that the property to disable NEXUS-20349 changes was
# THIS PROPERTY HAS NO EFFECT - DO NOT USE
That property name was not correct and has no effect. If still required, it should be changed to the correct property setting.