Hi, > Felix Benz-Baldas <[email protected]> hat am 1. März 2016 um 12:35 > geschrieben: > > > Hello, > > we plan to use PDFBox 2.0.0 for converting PDFs to JPEG. We want to convert a > very large number of documents (more than one million). > > One question: Is it possible to control the memory-consumption? When I start > my java program with "-Xmx2g" I ran into a "java.lang.OutOfMemoryError: Java > heap space" after about 40 minutes. > > With "-Xmx4g" the error did not occur. > > Is there a way to reduce the memory-consumption? It depends on the cause for that exception:
- your code has a memory leak - PDFBox has a memory leak - one or more of the pdfs you are processing is malformed or somehow criticial - something else I'm missing .... As a start, please post the relevant part of your code. Run your app in a profiler to analyze the memory consumption and garbage collection. Try to detect critical pdfs and share them with us. BR Andreas > Kind regards from the CAS Campus > > Felix Benz-Baldas > > CAS Ecosystems - eine SmartCompany der CAS Software AG - > www.cas-ecosystems.de<http://www.cas-ecosystems.de/> > > > CAS Software AG · CAS-Weg 1 - 5 · 76131 Karlsruhe, Germany · Phone: +49 > 721-9638-0 > Successful relationships. www.cas.de/en<http://www.cas.de/en> · > linkedin<http://www.linkedin.com/company/cas-software-ag> > Legals<http://www.cas-mittelstand.de/en/about-us/legals.html> > > Executive board: Martin Hubschneider (CEO) · Ludwig Neer > Supervisory board: Dr. Dr. Jörg Maurer (chair) · Prof. Dr. Peter Lockemann · > Kurt Sibold > Head Office: Karlsruhe · County Court Mannheim · Register of Companies Number: > HRB 108751 · VAT Identification Number: DE143593148 > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

