I have a program(x64) that consumes a large amount of memory.
I am running it on win server 2008 R2 SP1
with 48 GB RAM(64 bit)
, .net frame work 4.5
.
I have also set gcAllowVeryLargeObjects = true
in app.config.
When I run the program it consumes 18 GB memory after that it gives exception
EXCEPTION: System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
at System.Text.StringBuilder.ExpandByABlock(Int32 minBlockCharCount)
at System.Text.StringBuilder.Append(Char* value, Int32 valueCount)
at System.Text.StringBuilder.Append(String value)
at System.Xml.XmlTextEncoder.Write(String text)
at System.Xml.XmlTextWriter.WriteWhitespace(String ws)
at System.Xml.XmlElement.WriteElementTo(XmlWriter writer, XmlElement e)
at System.Xml.XmlNode.get_OuterXml()
at System.Security.Cryptography.Xml.Utils.PreProcessElementInput(XmlElement e
lem, XmlResolver xmlResolver, String baseUri)
at System.Security.Cryptography.Xml.Reference.CalculateHashValue(XmlDocument
document, CanonicalXmlNodeList refList)
at System.Security.Cryptography.Xml.SignedXml.BuildDigestedReferences()
at System.Security.Cryptography.Xml.SignedXml.ComputeSignature()
Its giving the "Insufficient memory" however we still have 30 GB memory free . Is it the limit of .net application or the server that giving me this error.