Oxygen WebHelp build - Out of memory

Post here questions and problems related to editing and publishing DITA content.
ann.jensen
Posts: 295
Joined: Wed Jun 17, 2015 10:19 am

Oxygen WebHelp build - Out of memory

Post by ann.jensen »

Hi,
I am creating DITA topics in Oxygen Author, checking in to a Toirtoise SVN branch and building on a TeamCity Server. All has been fine for a few months now until Monday I got a build error saying "failed due to - Out of memory: GC overhead limit exceeded ".
I increased the parameter in the dita.bat build file to "-DbaseJVMArgLine=-Xmx1024m" (from 254). This resulted in the build going on for 1 and half hours but failing with error "Out of memory: Java heap space".
These errors started when I added a new file whose purpose is to hold code blocks that are reused (using conrefs) by 10-15 other files.
However, when I build locally within Oxygen Author or locally using a local build.bat file, everything builds fine. :?

Can anyone advise what might be causing these problems?
Thanks in advance,
Ann
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: Oxygen WebHelp build - Out of memory

Post by Radu »

Hi Ann,
However, when I build locally within Oxygen Author or locally using a local build.bat file, everything builds fine.
Could you tell me how you increased the memory in the dita.bat?
The change in the command line should have been something like:

Code: Select all

"%_JAVACMD%" [b]-Xmx1024m[/b] %ANT_OPTS% .............
Other potential differences between running from Oxygen and running from outside:

Are you using to build the same DITA OT 2.x version which is bundled with Oxygen?
Are you using in the dita.bat the same Java Virtual Machine version with the one bundled with Oxygen?
Oxygen comes with a newer Saxon 9 EE commercial XSLT processor, the DITA OT process when run from outside uses an older Saxon 9 XSLT processor. Not sure this is the problem though.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
ann.jensen
Posts: 295
Joined: Wed Jun 17, 2015 10:19 am

Re: Oxygen WebHelp build - Out of memory

Post by ann.jensen »

Hi Radu,
Could you tell me how you increased the memory in the dita.bat?
We use a customised version of the build.bat that came with DITA-OT 1.8.5. One of the parameters at the bottom of this file is

Code: Select all

"-DbaseJVMArgLine=-Xmx1024m"
.
Are you using to build the same DITA OT 2.x version which is bundled with Oxygen?
I am using DITA-OT 1.8 that comes with Oxygen running within Oxygen Author and am using a download of DITA-OT 1.8.5 outside of Oxygen Author locally and the TeamCity build is using the same download of DITA-OT 1.8.5.
Are you using in the dita.bat the same Java Virtual Machine version with the one bundled with Oxygen?
Unfortunately I don't currently have access to the build file up on the TeamCity at the moment but am pretty sure they are the same.

The build error from TeamCity is

Code: Select all

 BUILD FAILED

[16:46:11][Step 3/4] C:\Dita\DITA-OT1.8.5\build.xml:44: The following error occurred while executing this line:

[16:46:11][Step 3/4] C:\Dita\DITA-OT1.8.5\plugins\com.oxygenxml.webhelp\build_dita.xml:294: java.lang.OutOfMemoryError: GC overhead limit exceeded

[16:46:11][Step 3/4] at java.util.Arrays.copyOfRange(Arrays.java:3664)

[16:46:11][Step 3/4] at java.lang.StringBuffer.toString(StringBuffer.java:671)

[16:46:11][Step 3/4] at java.net.URI.defineString(URI.java:1999)

[16:46:11][Step 3/4] at java.net.URI.toString(URI.java:1603)

[16:46:11][Step 3/4] at net.sf.saxon.functions.Document.makeDoc(Document.java:298)

[16:46:11][Step 3/4] at net.sf.saxon.functions.Document$DocumentMappingFunction.map(Document.java:224)

[16:46:11][Step 3/4] at net.sf.saxon.expr.ItemMappingIterator.next(ItemMappingIterator.java:46)

[16:46:11][Step 3/4] at net.sf.saxon.value.SequenceExtent.<init>(SequenceExtent.java:98)

[16:46:11][Step 3/4] at net.sf.saxon.sort.DocumentOrderIterator.<init>(DocumentOrderIterator.java:30)

[16:46:11][Step 3/4] at net.sf.saxon.functions.Document.iterate(Document.java:197)

[16:46:11][Step 3/4] at net.sf.saxon.expr.PathExpression.iterate(PathExpression.java:653)

[16:46:11][Step 3/4] at net.sf.saxon.expr.PathExpression.iterate(PathExpression.java:653)

[16:46:11][Step 3/4] at net.sf.saxon.expr.FilterExpression.iterate(FilterExpression.java:1058)

[16:46:11][Step 3/4] at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:89)

[16:46:11][Step 3/4] at net.sf.saxon.value.Value.getIterator(Value.java:202)

[16:46:11][Step 3/4] at net.sf.saxon.expr.VariableReference.iterate(VariableReference.java:434)

[16:46:11][Step 3/4] at net.sf.saxon.functions.Existence.effectiveBooleanValue(Existence.java:105)

[16:46:11][Step 3/4] at net.sf.saxon.instruct.Choose.processLeavingTail(Choose.java:679)

[16:46:11][Step 3/4] at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:549)

[16:46:11][Step 3/4] at net.sf.saxon.instruct.Choose.processLeavingTail(Choose.java:686)

[16:46:11][Step 3/4] at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:556)

[16:46:11][Step 3/4] at net.sf.saxon.instruct.Template.expand(Template.java:220)

[16:46:11][Step 3/4] at net.sf.saxon.instruct.CallTemplate.process(CallTemplate.java:257)

[16:46:11][Step 3/4] at net.sf.saxon.instruct.CallTemplate.processLeavingTail(CallTemplate.java:281)

[16:46:11][Step 3/4] at net.sf.saxon.instruct.Choose.processLeavingTail(Choose.java:686)

[16:46:11][Step 3/4] at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:556)

[16:46:11][Step 3/4] at net.sf.saxon.instruct.Instruction.process(Instruction.java:93)

[16:46:11][Step 3/4] at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:296)

[16:46:11][Step 3/4] at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:556)

[16:46:11][Step 3/4] at net.sf.saxon.instruct.Instruction.process(Instruction.java:93)

[16:46:11][Step 3/4] at net.sf.saxon.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:278)

[16:46:11][Step 3/4] at net.sf.saxon.expr.ExpressionTool.evaluate(ExpressionTool.java:296)
I believe TeamCity build file is using a different version of Saxon. Do you think from this build error that Saxon is the problem?
Thanks,
Ann
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: Oxygen WebHelp build - Out of memory

Post by Radu »

Hi Ann,

Setting the -DbaseJVMArgLine=-Xmx1024m parameter only controls the additional Java processes started by the ANT process. You also need to increase the memory for the actual ANT process. Something usually done by setting the ANT_OPTS variable to also contain something like -Xmx1024m[. So I'm not sure that your ANT process runs with the extra memory available, I do not have enough information as I do not know the contents of the script which you use to start ANT.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
ann.jensen
Posts: 295
Joined: Wed Jun 17, 2015 10:19 am

Re: Oxygen WebHelp build - Out of memory

Post by ann.jensen »

Thanks Radu,
Updating dita.bat to run build.xml with a higher memory setting for Java did the trick.
Regards,
Ann
Post Reply