[xep-support] OutOfMemory issues with XEP4.19

From: Justin Lipton <justin.lipton@exari.com>
Date: Mon Aug 27 2012 - 12:57:42 PDT

We recently discovered some memory issues with XEP4.19 during load testing.
The test comprised of multiple (about 5000 total renders) concurrent (no
more than 5) FO to PDF renders of the same two page input.
The input contains both tables and images.
We found that the memory usage slowly crept up over time a heap dump
revealed the following:

71,183,440 (28.34%) [32] 5 class com/speedlegal/genericexport/XEPExport
71,183,408 (28.34%) [16] 1 com/renderx/xep/FormatterImpl 0xde359840
71,183,392 (28.34%) [16] 1 com/renderx/xep/FormatterCore 0xdba87a10
71,183,376 (28.34%) [336] 23 com/renderx/xep/lib/Conf 0xde375fd8
67,949,056 (27.05%) [72] 10 com/renderx/xep/cmp/ImageFactory 0xdb32e790
65,786,552 (26.19%) [32] 1 com/renderx/util/Hashtable 0xdb32e9b8
65,786,520 (26.19%) [1,048,592] 91,000 array of java/lang/Object 0xe2864560

This basically means that our FormatterImpl object was holding into image
references which could not be garbage collected. We were using a single
FormatterImpl instance across threads to avoid the overhead of creating
this object over and over. We did not and could not call the cleanup()
method during this testing as we understand this cannot be called during

We made sure that TMPDIR and the appropriate MEMOIZE settings were in place
but this made no difference.

Using a new instance of the FormatterImpl for each render resolved the
memory issues.

- is this a known issue, bug or limitation?
- is correct use of the FormatterImpl documented somewhere? The forums
suggest that FormatterImpl should be used this way but cleanup should be
called from time to time. Perhaps cleanup() could block if a render is in


*Justin Lipton*
Email: justin.lipton@exari.com
Office: +613 9621 2775
Mobile: +614 0958 9943
Demo <http://www.exari.com/demo-trial.html>  Blog <http://blog.exari.com/>
Twitter <http://www.twitter.com/exari>
Boston | London | Melbourne | Munich
This e-mail message is transmitted to you by Exari Group, Inc.. This e-mail
contains information which may be confidential and legally privileged, and
is for the exclusive use of the intended recipient. If you are not the
intended recipient, any disclosure, copying, distribution or use of this
information is prohibited. If you have received this e-mail in error,
please notify us immediately by telephone +1 617.938.3777 or by e-mail and
then delete the message from your computer.

(*) To unsubscribe, please visit http://lists.renderx.com/mailman/options/xep-support
(*) By using the Service, you expressly agree to these Terms of Service http://w
Received on Mon Aug 27 12:47:20 2012

This archive was generated by hypermail 2.1.8 : Mon Aug 27 2012 - 12:47:26 PDT