Red Gate forums :: View topic - System.OutOfMemoryException
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
Deployment Manager
Deployment Manager forum

System.OutOfMemoryException

Search in Deployment Manager forum
Post new topic   Reply to topic
Jump to:  
Author Message
rantox



Joined: 12 Aug 2013
Posts: 6

PostPosted: Mon Aug 12, 2013 1:47 pm    Post subject: System.OutOfMemoryException Reply with quote

Hello, I'm trying to release a package on my local machine and I get this error:


Quote:
Execute step RESULTSETPACK version 1.0.0 against machine LOCAL
2013-08-12 12:40:57 INFO Evaluating deployment variables
2013-08-12 12:40:57 INFO Begin deployment
2013-08-12 12:40:57 DEBUG Deploying package RESULTSETPACK 1.0.0 to agent http://localhost:10301/
2013-08-12 12:41:05 ERROR Deployment on the Agent failed.
2013-08-12 12:41:05 INFO Agent output follows:
2013-08-12 12:40:57 DEBUG Begin deployment of package: RESULTSETPACK.1.0.0
2013-08-12 12:40:57 DEBUG Deployment Agent information is below:
2013-08-12 12:40:57 DEBUG - Machine name: DEV-01
2013-08-12 12:40:57 DEBUG - Is 64-bit: False
2013-08-12 12:40:57 DEBUG - Service user name: SYSTEM
2013-08-12 12:40:57 DEBUG - CLR version: 4.0.30319.225
2013-08-12 12:40:57 DEBUG - Current directory: C:\Windows\system32
2013-08-12 12:40:57 DEBUG - OS version: Microsoft Windows NT 6.1.7600.0
2013-08-12 12:40:57 DEBUG - Agent version: 2.1.8.8
2013-08-12 12:40:57 DEBUG Installing package RESULTSETPACK.1.0.0 from uploaded package cache into C:\ProgramData\Red Gate\DeploymentAgent\Applications\MyDev\RESULTSETPACK\1.0.0
2013-08-12 12:41:04 ERROR Error while executing job: Exception of type 'System.OutOfMemoryException' was thrown.
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.

Server stack trace:
at System.IO.MemoryStream.ToArray()
at NuGet.StreamExtensions.ToStreamFactory(Stream stream)
at NuGet.ZipPackageFile..ctor(PackagePart part)
at NuGet.ZipPackage.<GetFilesNoCache>b__11(PackagePart part)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at NuGet.ZipPackage.GetFilesNoCache()
at System.Lazy`1.CreateValue()

Exception rethrown at [0]:
at System.IO.MemoryStream.ToArray()
at NuGet.StreamExtensions.ToStreamFactory(Stream stream)
at NuGet.ZipPackageFile..ctor(PackagePart part)
at NuGet.ZipPackage.<GetFilesNoCache>b__11(PackagePart part)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at NuGet.ZipPackage.GetFilesNoCache()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at NuGet.MemoryCache.GetOrAdd[T](Object cacheKey, Func`1 factory, TimeSpan expiration, Boolean absoluteExpiration)
at NuGet.ZipPackage.GetFilesBase()
at NuGet.ZipPackage.GetAssembliesNoCache()
at System.Lazy`1.CreateValue()

Exception rethrown at [1]:
at System.IO.MemoryStream.ToArray()
at NuGet.StreamExtensions.ToStreamFactory(Stream stream)
at NuGet.ZipPackageFile..ctor(PackagePart part)
at NuGet.ZipPackage.<GetFilesNoCache>b__11(PackagePart part)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at NuGet.ZipPackage.GetFilesNoCache()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at NuGet.MemoryCache.GetOrAdd[T](Object cacheKey, Func`1 factory, TimeSpan expiration, Boolean absoluteExpiration)
at NuGet.ZipPackage.GetFilesBase()
at NuGet.ZipPackage.GetAssembliesNoCache()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at NuGet.MemoryCache.GetOrAdd[T](Object cacheKey, Func`1 factory, TimeSpan expiration, Boolean absoluteExpiration)
at NuGet.ZipPackage.GetAssemblyReferencesBase()
at NuGet.LocalPackage.get_AssemblyReferences()
at NuGet.PackageExtensions.HasProjectContent(IPackage package)
at NuGet.PackageWalker.GetPackageTarget(IPackage package)
at NuGet.PackageWalker.GetPackageInfo(IPackage package)
at NuGet.PackageWalker.ProcessPackageTarget(IPackage package)
at NuGet.PackageWalker.Walk(IPackage package)
at NuGet.InstallWalker.ResolveOperations(IPackage package)
at NuGet.PackageManager.Execute(IPackage package, IPackageOperationResolver resolver)
at NuGet.PackageManager.InstallPackage(IPackage package, FrameworkName targetFramework, Boolean ignoreDependencies, Boolean allowPrereleaseVersions)
at NuGet.PackageManager.InstallPackage(IPackage package, Boolean ignoreDependencies, Boolean allowPrereleaseVersions)
at NuGet.PackageManager.InstallPackage(String packageId, SemanticVersion version, Boolean ignoreDependencies, Boolean allowPrereleaseVersions)
at RedGate.Deploy.Agent.Deployment.Packages.PackageInstaller.InstallPackageUsingNuGet(IPackageMetadata package, SemanticVersion version, String packageInstallationPath, String packageUploadPath)
at RedGate.Deploy.Agent.Deployment.Packages.PackageInstaller.Install(IPackageMetadata package, IPackageInstallationOptions options)
at RedGate.Deploy.Agent.Deployment.DeploymentController.Execute(PackageMetadata package, IVariableDictionary variables)
at RedGate.Deploy.Agent.Services.Jobs.DeployPackageJobExecutor.Execute(DeployPackageJob job)
at CallSite.Target(Closure , CallSite , Object , Object )
at RedGate.Deploy.Agent.Services.Jobs.JobQueue.RunDeployments(Object ignored)
2013-08-12 12:41:04 DEBUG Purged 0 sends older than 1.00:00:00.
2013-08-12 12:41:04 WARN Report last sent at 08/12/2013 12:38:47. Report send skipped.
Back to top
View user's profile Send private message
chirayu



Joined: 17 Sep 2012
Posts: 60

PostPosted: Tue Aug 13, 2013 11:01 am    Post subject: Reply with quote

How large is the package that you are trying to deploy? Your deployment packages have been downloaded on C:\ProgramData\Red Gate\DeploymentManager\Data\PackageCache on your Deployment Manager server. Your package should be called RESULTSETPACK.1.0.0

We rely on NuGet packages to do our deployments. The total memory use depends on how NuGet unzips a package (we unzip the package on the Agent before installing it). We have had an issue with NuGet before as it tries to load a significant chunk of the package into memory during install and of course, the decompression also expands the package size.

May I also ask, what type of package are you deploying, is it a database package with static data?
_________________
Chirayu Shishodiya
Software Engineer - Deployment Manager
Red Gate
Back to top
View user's profile Send private message
rantox



Joined: 12 Aug 2013
Posts: 6

PostPosted: Tue Aug 13, 2013 12:16 pm    Post subject: Reply with quote

The package is almost 100Mb and it also contains data.
Back to top
View user's profile Send private message
chirayu



Joined: 17 Sep 2012
Posts: 60

PostPosted: Tue Aug 13, 2013 4:23 pm    Post subject: Reply with quote

Sorry about the problem you have been having! Other users have also hit this issue, RGD-553 is the issue id in our bug tracking system, for your reference.

It might take longer than a usual Deployment Manager bug fix though as it will require modifying NuGet library and for our request to be accepted.
_________________
Chirayu Shishodiya
Software Engineer - Deployment Manager
Red Gate
Back to top
View user's profile Send private message
chirayu



Joined: 17 Sep 2012
Posts: 60

PostPosted: Fri Aug 16, 2013 11:19 am    Post subject: Reply with quote

Just a quick update on this issue, we have managed to fix this issue. It should be released on Wednesday next week.
_________________
Chirayu Shishodiya
Software Engineer - Deployment Manager
Red Gate
Back to top
View user's profile Send private message
rantox



Joined: 12 Aug 2013
Posts: 6

PostPosted: Tue Aug 20, 2013 4:38 pm    Post subject: Reply with quote

ok, can't wait to try it
Back to top
View user's profile Send private message
Emma A



Joined: 30 Mar 2009
Posts: 40

PostPosted: Wed Aug 21, 2013 5:33 pm    Post subject: Reply with quote

The version of Deployment Manager that contains the new version of NuGet and should address your issue has just been released.
Please make sure to upgrade the server and your agents to benefit from this fix.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group