Answered by:
Out of memory exception with nuget restore

Question
-
I saved my project.json and it did a nuget restore, even when no packages had changed, and receive an out of memory exception
Package restore failed: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at System.Reflection.AssemblyName.nGetFileInformation(String s) at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile) at Microsoft.Azure.WebJobs.Script.Description.PackageAssemblyResolver.InitializeAssemblyRegistry(FunctionMetadata metadata) at Microsoft.Azure.WebJobs.Script.Description.FunctionMetadataResolver.<RestorePackagesAsync>d__25.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.WebJobs.Script.Description.DotNetFunctionInvoker.<RestorePackagesAsync>d__22.MoveNext()
- Edited by mDrewitt Wednesday, February 22, 2017 4:49 PM
Wednesday, February 22, 2017 4:49 PM
Answers
-
No problem. If you get into that state again, we'll take a look. One thing you can do next time is take a copy of the cache folder before clearing it. Hopefully that's all that's needed to repro.
David
- Proposed as answer by Sjoukje ZaalMVP Thursday, March 16, 2017 12:20 PM
- Marked as answer by Sjoukje ZaalMVP Monday, March 27, 2017 2:27 PM
Wednesday, February 22, 2017 6:53 PM
All replies
-
Is this happening consistently with that function app, or randomly?Wednesday, February 22, 2017 5:15 PM
-
Consistently. It occurs at the end, so it appears to be installing the packages, but dying afterward and saying it failed. I have tracked it down to a specific package, but this may be a problem with something being corrupted on our end? I have tried this on a different function app without issue, but the version consistently fails on our main app.Wednesday, February 22, 2017 6:30 PM
-
Can you share your function app name (that's the function app name, not the function name), either directly or indirectly? This will help us investigate.
Also, please include any relevant detail, like the name of the function at stake, etc...
thanks,
DavidWednesday, February 22, 2017 6:32 PM -
I can confirm it was a bad copy of the package that required a cache clear and restore. Due to my testing it probably won't be the most useful for you to take a look now as it appears to be resolved, my apologies, I should have preserved the current state for your debugging.
I'm not sure how a package that was working for the past couple weeks would end up in this state as the package version has not changed since we started developing this function.
Thanks,
Matt.
Wednesday, February 22, 2017 6:49 PM -
No problem. If you get into that state again, we'll take a look. One thing you can do next time is take a copy of the cache folder before clearing it. Hopefully that's all that's needed to repro.
David
- Proposed as answer by Sjoukje ZaalMVP Thursday, March 16, 2017 12:20 PM
- Marked as answer by Sjoukje ZaalMVP Monday, March 27, 2017 2:27 PM
Wednesday, February 22, 2017 6:53 PM