Open ADD-Juan-Perez opened 2 years ago
Hi, I may have just fixed this for you. https://github.com/loic-sharma/BaGet/pull/716
Otherwise, if you don't care about updating the download count, you could simply comment out the call
await _packages.AddDownloadAsync(id, version, cancellationToken);
in BaGet.Core.DefaultPackageContentService
We use private NuGet feed for providing binary updates to worker machines and I had to put download count increment into try/catch block to stop error propagation which caused HTTP 500 errors.
When dozens of downloads are initiated at the same moment, the HTTP 500 is guaranteed to occur.
We are starting to use BaGet as our package repository instead of Azure DevOps Server. After one month of using it, builds started to fail due to Internal Server Errors when restoring packages. Looking at the BaGet logs we saw that this exception is being logged many times:
To solve this, we had to reduce the number of packages stored in the database, from 100.000 to 50.000 packages, and the Internal Server Errors disappeared although that exception is still being recorded in the BaGet log. The reason so many packages are stored is because we have a continuous integration process involving many builds to publish and restore packages.
For more information, BaGet is installed in an IIS on a Windows Server 2019 Standard and the database server is a SQL Server 2019.
Is there anything we can do without modifying the code to avoid this exception? Change the database server to PostgreSQL or MySQL?
Thank you in advance for your dedication to this project.