Running out of heap space

Oxygen general issues.
craigj
Posts: 9
Joined: Thu Oct 29, 2009 1:51 pm

Running out of heap space

Post by craigj »

I have a 500k line XSL-FO file that I'm trying to convert to a PDF using FOP, however Oxygen is telling me that FOP is running out of memory.
SystemID: C:\Users\Craig\Desktop\display.xml
Engine name: Apache FOP
Severity: error
Description: The process 'Apache FOP' ended with code: 1.
The error was:
Transformer is net.sf.saxon.IdentityTransformer@513d61
ERROR - Image not found: nhs.jpg
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
I'm running on Windows 7 64-bit on an i7 processor with 8GB of RAM.

First off, I'd like to ensure that Oxygen is using the 64-bit JRE rather than 32-bit. Where is this configured?

Additionally, I'd like to know if it's possible to increase the heap space for Oxygen/FOP? Can I supply runtime arguments or similar?
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Running out of heap space

Post by adrian »

Hello,

Regarding Apache FOP, you can adjust its heap memory in Options -> Preferences -> XML -> XSLT-FO-XQuery -> FO Processors, Memory available to the built-in FOP. 512 or 768 should be more than enough, avoid going over 1200 because of the 32-bit JRE.


The Windows kit has a bundled 32-bit JRE and Oxygen is only using that bundled JRE. Unfortunately you cannot simply switch the 32-bit JRE of the installed Oxygen with a 64-bit one. All the launchers(.exe) are 32-bit applications and because of this they only work with the 32-bit JRE.

Note however that there's a 64-bit kit of Oxygen(with a bundled 64-bit JRE) that can be found here:
http://www.oxygenxml.com/download_oxyge ... 64bit.html
This kit not linked in the main download page because the 64-bit JRE is much more memory hungry and there are also some compatibility issues with some database drivers(It's all mentioned on that page).
Note that the 64-bit Oxygen is probably only useful if you are editing extremely large XML files and have memory to spare(which you have). Regardless of 32/64 bit in some situations you will still have to manually edit the oxygen.vmoptions file to provide more heap memory for Oxygen(-Xmx argument). Note that this is only for Oxygen, not for FOP.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
craigj
Posts: 9
Joined: Thu Oct 29, 2009 1:51 pm

Re: Running out of heap space

Post by craigj »

I increased the memory available to FOP to 1000 (from the default of 200) and it was able to complete successully.

Adrian: Many thanks for you reply!
Post Reply