Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

NuGet restore intermittent 500 failures



  • When doing dotnet restore using my proget server it fails ~70% of the times with 500s
    some of the logs:

     An error occurred processing a GET request to http://<***myProGetNugetEndpoint***>/package/Libuv/1.9.0: An error occurred while communicating with the remote host. The error code is 0x800703E3.
    
     Details:
       at System.Web.Hosting.ISAPIWorkerRequestInProcForIIS6.FlushCore(Byte[] status, Byte[] header, Int32 keepConnected, Int32 totalBodySize, Int32 numBodyFragments, IntPtr[] bodyFragments, Int32[] bodyFragmentLengths, Int32 doneWithSession, Int32 finalStatus, Boolean& async)
       at System.Web.Hosting.ISAPIWorkerRequest.FlushCachedResponse(Boolean isFinal)
       at System.Web.HttpResponse.Flush(Boolean finalFlush, Boolean async)
       at System.Web.HttpWriter.WriteFromStream(Byte[] data, Int32 offset, Int32 size)
       at System.IO.Stream.<>c.<BeginWriteInternal>b__46_0(Object )
       at System.Threading.Tasks.Task`1.InnerInvoke()
       at System.Threading.Tasks.Task.Execute()
    

    or different error:

    An error occurred processing a GET request to http://<***myProGetNugetEndpoint***>/package/AWSSDK.Core/3.3.5: Access to the path is denied.
    
     at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
      at System.IO.Path.InternalGetTempFileName(Boolean checkHost)
      at Inedo.IO.TemporaryStream.Create(Int64 expectedLength)
      at Inedo.ProGet.WebApplication.SimpleHandlers.NuGet.NuGetApi.GetHandler.<TransmitPackageAsync>d__1.MoveNext()
    

    Product: ProGet
    Version: 4.5.4



  • A NuGet package restore often acts like a Denial of Service attack against your network/server; your workstation is issuing hundreds of simultaneous requests, and a lot of infrastructure can't handle it. The ProGet software itself can, but most of these requests never make it to ProGet, or are terminated halfway through the request by intermediate hardware (sometimes a buggy workstation driver), which leads to a cascade of failures.

    There's no good solution, aside from less packages, better hardware, and load balancing. You may also be able to tweak IIS to better handle the load, but that requires specific expertise in managing high-traffic sites.



  • Hello Alana,
    I'm sure that hardware should be capable of restoring just a few packages as it's a m3.medium machine in AWS which is running JUST proget, and I'm doing requests from only ONE computer. We have nuget server which is serving 600k requests a day without any problem in the same infrastructure, so I wouldn't blame hardware here.
    I'll try to check if something it throttling that and it's a good hint as usually first restore after an hour of inactivity works, and then the following one doesn't.
    Also your claim that the request it's not even going to proget doesn't sound valid as proget is logging errors in it's console 'Access to the path is denied.`.
    If you can help more please do.



  • An "Access to the path is denied" message is coming from Windows.

    Permissions aside, a likely culprit is anotherr process (anti virus, backup, etc) is locking the file and preventing access. Sometimes you'll need to use ProcMon to identify what this is. ProGet does not requests locks when reading files.



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation