ARTIFACTORY: How to Resolve "Executing NuGet Feed Calculation Stuck Tasks" in Artifactory for NuGet Repositories

AuthorFullName__c
Shivani Budhodi
articleNumber
000006100
FirstPublishedDate
2024-05-22T06:25:21Z
lastModifiedDate
2025-07-22

ARTIFACTORY: How to Resolve "Executing NuGet Feed Calculation Stuck Tasks" in Artifactory for NuGet Repositories

Possible reasons behind the NuGet stuck tasks Issue:

There could be multiple causes for the occurrence of this issue. It usually arises when threads get stuck during the NuGet feed calculation process. This can happen in scenarios where there is a large volume of NuGet packages or when multiple sources (feeds) are configured. The resulting complexity can cause the calculation and indexing processes to become slow and eventually stuck. Here are a few examples illustrating scenarios where this issue may arise.

1. Large number of NuGet Packages and Multiple Feeds: A high number of NuGet packages or numerous configured feeds can overwhelm the system, leading to slow calculations and indexing.

2. Network Issues: If the environment is experiencing network connectivity problems, the NuGet feed calculation process might get stuck while attempting to access the remote upstream.

3. Local NuGet Cache Corruption: Corruption within the local NuGet cache can also result in the calculation process hanging. Ensuring the integrity of the local cache is important for fast feed calculations.

In such scenarios, you will notice the following entries in the Artifactory logs:

2024-04-27T14:01:28.058Z [jfrt ] [INFO ] [76048202b09d6d29] [.AsyncWorkQueueServiceImpl:283] [09d6d38|WorkQueueJob] - Executing Nuget Feed Calculation stuck tasks: 310

2024-04-27T14:01:33.059Z [jfrt ] [INFO ] [8884d03b50b00245] [.AsyncWorkQueueServiceImpl:283] [0b00278|WorkQueueJob] - Executing Nuget Feed Calculation stuck tasks: 304

2024-04-27T14:01:38.059Z [jfrt ] [INFO ] [781a97cec54ad1nd] [.AsyncWorkQueueServiceImpl:283] [54ad1da|WorkQueueJob] - Executing Nuget Feed Calculation stuck tasks: 268  
How to overcome this issue:

To address the issue of stuck NuGet tasks, it is recommended to tune your Artifactory instance by increasing the number of NuGet metadata workers. This can significantly enhance NuGet performance. Additionally, disabling the NuGet search cache mechanism may also help alleviate the issue.

Note: The default value for the properties, artifactory.nuget.v2.feed.calculation.workers is 5 and for artifactory.nuget.v2.search.cache.enabled is true. 

artifactory.nuget.v2.feed.calculation.workers=10
artifactory.nuget.v2.search.cache.enabled=false


We need to add the above-mentioned properties into artifactory.system.properties file present inside the path $JFROG_HOME/artifactory/var/etc/artifactory/artifactory.system.properties. After adding these properties, please proceed with the restart of the Artifactory server.