0

I am using docx4j to read and modify ppt template from a web application. There are multiple request at a time. So concurrent read and modify PPT file operations are performed. But after some request server throws out of memory error. So that many request are failed. I have assigned 5GB memory to JVM.

We load the template using

PresentationMLPackage ppt = (PresentationMLPackage) OpcPackage.load(new File(inputfilepath));

and save it finally using

File f1 = new File(outputfilepath);
ppt.save(f1);

We do not close or assign the ppt to null anywhere. Can you help us with the issue?

Sagar J
  • 1
  • 1
  • Do you think this is a simple case of not enough memory allocated, or a memory leak? If the latter, what do you do between loading and saving? Is there a single specific pptx file with which you can repro the issue? – JasonPlutext Mar 18 '15 at 21:17
  • @JasonPlutext Yes, I think this is a case of not enough memory allocated. But I have to do same operations in limited memory. In between loading and saving, I am traversing multiple slides, charts, embedded spreadsheets and changing some text of it. This operation is performed on single pptx template file. – Sagar J Mar 19 '15 at 05:52
  • I guess you should gain a better understanding of memory usage, perhaps just with a single request (and different input pptx, if appropriate). Use a profiler? – JasonPlutext Mar 20 '15 at 09:30

0 Answers0