Hi,
first of all thanks for you great product. I've used it in a number
applications to date.

Recently we've come across an issue whereby our application was exhausting
all native memory when using iText. We're running the application on Solaris
9 and our Java memory settings are -Xmx2048m -Xms 2048m. After merging a few
hundred PDFs we found that iText was using up at least 1.5GB of native
memory. Ultimately our total process memory exceeded 4GB and caused
OutOfMemory exceptions. After diagnosing the issue, I came across the
following Sun bug that might have an impact on iText:

http://74.125.77.132/search?q=cache:8Dw3YomvnVAJ:bugs.sun.com/bugdatabase/vie
w_bug.do%3Fbug_id%3D4797189+outofmemory+deflater&hl=en&ct=clnk&cd=1&gl=ie

After reviewing the bug it would appear that the
com.lowagie.text.pdf.PdfStream could be susceptable to the same issue. This
class uses DeflaterOutputStream but never calls the end() method on its
Deflater object. Although the close() method is called on
DeflaterOutputStream which in turn calls close() on its Deflater object,
because a Deflater is specfied in the constructor (new
DeflaterOutputStream(stream, new Deflater(compressionLevel));) the end()
method never gets called.
Our OutOfMemory error looks as follows:
java.lang.OutOfMemoryError
        at java.util.zip.Deflater.init(Native Method)
        at java.util.zip.Deflater.<init>(Deflater.java:117)
        at java.util.zip.Deflater.<init>(Deflater.java:126)
        at com.lowagie.text.pdf.PdfStream.flateCompress(Unknown Source)
        at com.lowagie.text.pdf.PdfFormXObject.<init>(Unknown Source)
        at com.lowagie.text.pdf.PdfTemplate.getFormXObject(Unknown Source)
        at com.lowagie.text.pdf.PdfWriter.releaseTemplate(Unknown Source)
        at com.lowagie.text.pdf.AcroFields.setField(Unknown Source)
        at com.lowagie.text.pdf.AcroFields.setField(Unknown Source)
        at com.lowagie.text.pdf.AcroFields.setFields(Unknown Source)

Is this something that has previously been raised with iText?

Many thanks,
Eoin


Eoin Mallin
______________________________________________________________
Revenue On-Line Services
Castle View
Georges Street
Dublin 2
VPN: 35379


************************

This message has been delivered to the Internet by the Revenue Internet e-mail 
service (OP)

*************************

------------------------------------------------------------------------------
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to