http://itext.svn.sourceforge.net/viewvc/itext?view=rev&revision=3632
Paulo > -----Original Message----- > From: Mallin, Eoin [mailto:[email protected]] > Sent: Monday, January 05, 2009 12:18 PM > To: [email protected] > Subject: Re: [iText-questions] iText memory issue > > > Hi, > following on from my mail on the 23/12, we've built a version > a iText which > explicitly calls on the end() method on the Deflater object in the > com.lowagie.text.pdf.PdfStream class. This has successfully > resolved our > memory issue on Solaris 9. The Sun Bug ID that describes this issue is > 4797189 (http://bugs.sun.com/view_bug.do?bug_id=4797189). Can this be > included in a future release of iText? We're reluctant to release the > binaries we've built as this would affect backward > compatibility with future > versions. I've attached a copy of the code changes I've made. > > Many thanks, > Eoin Mallin > > <<PdfStream.java>> > > > -----Original Message----- > > From: Mallin, Eoin > > Sent: 23 December 2008 16:29 > > To: '[email protected]' > > Subject: iText memory issue > > > > 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/v > > > iew_bug.do%3Fbug_id%3D4797189+outofmemory+deflater&hl=en&ct=cl > nk&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) > > ************************* Aviso Legal: Esta mensagem é destinada exclusivamente ao destinatário. Pode conter informação confidencial ou legalmente protegida. A incorrecta transmissão desta mensagem não significa a perca de confidencialidade. Se esta mensagem for recebida por engano, por favor envie-a de volta para o remetente e apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de usar, revelar ou distribuir qualquer parte desta mensagem. Disclaimer: This message is destined exclusively to the intended receiver. It may contain confidential or legally protected information. The incorrect transmission of this message does not mean the loss of its confidentiality. If this message is received by mistake, please send it back to the sender and delete it from your system immediately. It is forbidden to any person who is not the intended receiver to use, distribute or copy any part of this message.
------------------------------------------------------------------------------
_______________________________________________ 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
