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!

Exception pushing a package



  • While pushing an already existing package to nuget, sometimes we get a (500) Internal Server Error from ProGet.
    The file is locked by ProGet itself: recycling the application pool solves the problem.

    Here is the push command:

    nuget push c:\TEMP\fetchpackages\out<PackageId>.3.0.0<PackageId>.3.0.0.nupkg -Source https://nuget.ges.ferlan.it/nuget/default -Verbosity detailed

    And this is the output:

    Pushing <PackageId> 3.0.0 to 'https://nuget.ges.ferlan.it/nuget/default'...
    PUT https://<ProgetAddress>/nuget/default/
    System.InvalidOperationException: Failed to process request. 'There was an error processing the request: The process cannot access the file '<ProgetFeedPath><PackageId>.3.0.0.nupkg' because it is being used by another process.'.
    EXEC : The remote server returned an error : (500) Internal Server Error.. ---> System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
    at System.Net.HttpWebRequest.GetResponse()
    at NuGet.RequestHelper.GetResponse(Func1 createRequest, Action1 prepareRequest, IProxyCache proxyCache, ICredentialCache credentialCache, ICredential Provider credentialProvider)
    at NuGet.HttpClient.GetResponse()
    at NuGet.PackageServer.EnsureSuccessfulResponse(HttpClient client, Nullable1 expectedStatusCode) --- End of inner exception stack trace --- at NuGet.PackageServer.EnsureSuccessfulResponse(HttpClient client, Nullable1 expectedStatusCode)
    at NuGet.PackageServer.PushPackageToServer(String apiKey, Func`1 packageStreamFactory, Int32 timeout)
    at NuGet.PackageServer.PushPackage(String apiKey, IPackage package, Int32 timeout)
    at NuGet.Commands.PushCommand.PushPackageCore(String source, String apiKey, PackageServer packageServer, String packageToPush, TimeSpan timeout)
    at NuGet.Commands.PushCommand.PushPackage(String packagePath, String source, String apiKey, TimeSpan timeout)
    at NuGet.Commands.PushCommand.ExecuteCommand()
    at NuGet.Commands.Command.Execute()
    at NuGet.Program.Main(String[] args)



  • Does this happen immediately after pushing another package? I'm wondering if the indexer has locked the file you're trying to push...



  • Sadly, I'm unable to reproduce it consistently.

    Actually packages are't stored under the default folder: we have configured ProGet to pick them from a network share.

    This is something we have to fix, but I'm quite concerned about these locks: overwrite a package is a really uncommon operation and actually the load on the server is quite low (we have approx. 30 packages, used by few projects).



  • In that case, it's most likely another process that's locking the file. We see this quite a bit in BuildMaster... some times it's anti-virus, or a back-up program.

    Can you try a different location (non-network), and see if that helps?



  • We have verified that the locking process is w3wp.exe (ProGet is the only website on that machine).

    No other process / users are allowed to access that network share (only ProGet has the required permissions).



  • We uncovered the cases in which it might lock... this should be addressed in ProGet 2.1.2 (released today).



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation