-
Notifications
You must be signed in to change notification settings - Fork 644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
High CPU usage (99%) by NuGet.Server #5536
Comments
@karthickramasamy08, thanks for reporting this. It sounds like there are two issues going on:
Do you notice any relationship between these two events? Do all of the feeds have the same packages or do they have different packages and different number of packages? Could you provide some numbers per sub-application (feed):
You said you have 20 sub-applications. Are they all running as different processes? Could you look through your event viewer and verify that all of the |
Hi @joelverhagen , Please find the below reply for each queries mentioned in the last comment . Do all of the feeds have the same packages or do they have different packages and different number of packages? Could you provide some numbers per sub-application (feed):
You said you have 20 sub-applications. Are they all running as different processes? Could you look through your event viewer and verify that all of the UnauthorizedAccessException have the same stack trace? |
Hi @shishirx34 , Any update on this |
@karthickramasamy08 , as far as I understand, you are running multiple NuGet.Server applications on a single VM. I see that there's a ReaderWriterLockSlim that protects the write operation from being performed by multiple threads simultaneously. However, if multiple processes try to write to the same file, this lock will be useless, and the write operation will be susceptible to collisions. |
Hi @skofman1, Thanks for the update. Yes, we have already set the write permission for all the sub application folder. Now, we have accessed the NuGet packages in the Visual Studio and also we didn't caught the UnAuthorizedAccessException in the Event viewer. But, we are still faced the high CPU percentage issue in our NuGet Server. Already we have logged this CPU issue in this link(#5230). Please check and update your concerns. |
@karthickramasamy08 , @joelverhagen and I have a theory that the cause of the 99% CPU is the FileSystemWatcher. It updates the package cache appropriately on file system changes. Please try this out, and let us know if it resolves the issue. |
Thanks for sharing details, We have tried this case, but, still the CPU usage taken 99%. do we need to do anything further? or Could you please check and provide the correct fix for this server performance issue? We have faced production level issue due to this. Note: I posted this message behalf of @karthickramasamy08 Thanks, |
@skofman1/ @joelverhagen , Could you please update on this? is any other possibility to fix this issue? Thanks, |
@MathanKumarHJ , @karthickramasamy08 , since you are running NuGet.Server in a huge scale, it's hard for us to replicate your setup and investigate your scenario. All we can do from here is look at the code and make guesses. |
@karthickramasamy08 , any updates? |
Hi @skofman1, We can’t do this in our NuGet production server. After Install NuGet.Server version 3.0.3-jver-big-tmp-21027 from the following package source: Example: Root folder name – Package Path Exp1.Wpf14.2.0.12.nupkg While accessing our feed link this .nupkg packages are folder structure like below.
Question:
Thanks in Advance, |
Note that you shouldn't need to use this private build anymore. This fix has gone into the main branch and is available in NuGet.Server 3.1.0.
The package can be left in the root folder for a variety of reasons. For example, if the package already exists or if the package file is invalid in some way the package won't be moved.
Under the package path, the sub folder should be the full package ID.
We have been unable to reproduce the high CPU utilization on our side so it is very hard for us to guess what's causing the problem on your servers. Could you take some time to attempt to reproduce the issue in an isolated environment so you can run some CPU profiling tools? For example, you could spin up a dedicated server isolated from your production environment and push the same set of packages that are in your production environment. If this is too much effort, you could try a minimally intrusive profiling technique like PerfView. For example, I was able to find the following CPU flame graph from the IIS process (iisexpress.exe, in my case): If you could provide an |
Please feel free to re-open this issue if you are still blocked and you can provide the requested performance analysis. |
Hi,
We are configured our own NuGet feed using NuGet Server.
We have hosted nearly 20 sub applications in our server. each application is a NuGet feed.
We are faced NuGet server cache issue recently but as per below posts latest patch updated, the issue resolved. after that no issues occurred.
#5230
but recently we are facing our application taking 99% CPU usage. and below error logging continuously in event viewer. can you please suggests what is the reason for this issue.
The text was updated successfully, but these errors were encountered: