Project

Profile

Help

OutOfMemory Error

Added by Anonymous over 17 years ago

Legacy ID: #4157942 Legacy Poster: Raju (bnraju1)

I am using Saxon 6.5.5 version. I get the below error while parsing large XML documents (~ 80 MB). My JVM Initial Heap Size and Maximum Heap Size are set to 512 MB and 1024 MB. Any idea what is causing this? Any help on this issue would be appreciated. Caused by: java.lang.OutOfMemoryError at com.icl.saxon.tinytree.TinyDocumentImpl.ensureNodeCapacity(TinyDocumentImpl.java(Compiled Code)) at com.icl.saxon.tinytree.TinyDocumentImpl.addNode(TinyDocumentImpl.java(Inlined Compiled Code)) at com.icl.saxon.tinytree.TinyBuilder.startElement(TinyBuilder.java(Compiled Code)) at com.icl.saxon.ContentEmitter.startElement(ContentEmitter.java(Compiled Code)) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at com.icl.saxon.om.Builder.build(Builder.java(Compiled Code)) at com.icl.saxon.om.DocumentBuilderImpl.parse(DocumentBuilderImpl.java(Compiled Code)) at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)


Replies (1)

RE: OutOfMemory Error - Added by Anonymous over 17 years ago

Legacy ID: #4158014 Legacy Poster: Michael Kay (mhkay)

I would suggest trying it on Saxon 8.9. I'm not saying that will solve your problem, but it may provide better diagnostics. Run with the -t option to get information on the size of the tree. It's useful to construct smaller documents and measure how the memory usage increases as the document grows. That will help you to see where the limits are and how much memory to allocate. Every document is different: the general rule that you need 5 times the source document size (so 400Mb in your case) is just a rule of thumb. Michael Kay Saxonica Limited

    (1-1/1)

    Please register to reply