Large nuget package

Topics: General
Sep 9, 2013 at 9:25 AM
Hi,

I have a 500-600 MB nupkg and nuget push fails for the following error:
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.IO.MemoryStream.set_Capacity(Int32 value)
at System.IO.MemoryStream.EnsureCapacity(Int32 value)
at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.Stream.InternalCopyTo(Stream destination, Int32 bufferSize)
at System.IO.Stream.CopyTo(Stream destination)
at NuGet.MultipartWebRequest.CreateMultipartRequest(WebRequest request)
at NuGet.PackageServer.<>c__DisplayClass6.<PushPackageToServer>b__5(Object sender, WebRequestEventArgs e)
at System.EventHandler1.Invoke(Object sender, TEventArgs e)
at NuGet.HttpClient.RaiseSendingRequest(WebRequest webRequest)
at NuGet.RequestHelper.GetResponse(Func
1 createRequest, Action1 prepareRequest, IProxyCache proxyCache, ICredentialCache credentialCache, ICredentialProvid
er credentialProvider)
at NuGet.HttpClient.GetResponse()
at NuGet.PackageServer.EnsureSuccessfulResponse(HttpClient client, Nullable
1 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)


I have changed the web.config parameter to 1GB but still same error. I'm not even sure that it is a server side error message. Maybe some client side configuration for memory buffer size.

Can anyone please assist?

Thanks
Sep 13, 2013 at 11:48 PM
This is a client-side error. I've have a fix for it. It will be released it the next version 2.8.
Sep 15, 2013 at 6:54 AM
Thanks!!
Sep 19, 2013 at 8:19 PM
Meanwhile, if you want to try out the fix, you can download our nightly build from http://build.nuget.org/nuget.exe
Sep 29, 2013 at 12:51 PM
Edited Sep 29, 2013 at 12:52 PM
Works like a charm but I needed it to be a formal release as a new checkout/clone will not have this nuget.exe file and therefore will have issues to download such a big package

Thanks!!