Bug 57241 - POI 3.9 and framework Document Manager is retaining memory
Summary: POI 3.9 and framework Document Manager is retaining memory
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.9-FINAL
Hardware: PC All
: P2 critical (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2014-11-20 16:27 UTC by java_factory
Modified: 2015-09-13 20:57 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description java_factory 2014-11-20 16:27:05 UTC
Today I have performance issues after importing/exporting xlsm templates in my java web application ( apache,tomcat 6,POI 3.9,java 6,Oracle database).Uploading an xlsm file is taking 400 MB of memory and the memory is not totally released.

In total 65 % of the massive JVM memory is being retained by the POI APIs , Traditionally POI always known to have a higher memory footprint , it uses a lot of memory when dealing with large spreadsheets. 

Apart from POI, the framework Document Manager class was also retaining  28 % of the heap memory. I think here the documents which are being imported by the application are being stored in memory however references for those are being retained even after import finishes. That's the reason why probably JVM Garbage Collector is not being able to clean those objects from memory. 

Do you have a clue to free this memory?

thank you
Comment 1 Nick Burch 2014-11-20 16:31:08 UTC
Try upgrading to 3.11 beta 3, then make sure you're explicitly closing Workbooks you open + setting the references to null
Comment 2 Dominik Stadler 2015-09-13 20:57:08 UTC
No update for some time, therefore setting this to WORKSFORME for now, please reopen this if it is still a problem for you together with some sample-code that shows memory being kept after the Workbooks are close()ed and references to the Workbook are cleared.