Bug 46602

Summary: out.of.mem exception when performing batch import of document structure
Product: POI Reporter: Carl Skymne <carl.skymne>
Component: POI OverallAssignee: POI Developers List <dev>
Status: RESOLVED WORKSFORME    
Severity: major    
Priority: P2    
Version: 3.1-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: Windows Server 2003   

Description Carl Skymne 2009-01-26 04:11:47 UTC
Hi, 

we are using the poi implementation to perform a metadatatransfer to documents imported to our ECM solution.
When doing batch imports we notice that the memory is increasing rapidly ending up in an out of memory exception. The memory setting for the tomcat running the application server is 1024 mb.
It seems like the poi doesn´t release the memory after it is done with the metadata transfer for one document and before starting with the next. This makes the apache allocate more memory and in the end ending up with a out.of.mem exception in the log.
java.lang.OutOfMemoryError: Java heap space

The same test has been done without the metadata transfer and this does not end up in this error. 

We are using Apache Tomcat 5.5.25 as application server and java 1.5.0_12.
The application is Webtop 6.0 SP1 (EMC) and the import is performed to documentum contentserver 6.0 sp1 (EMC).

br
Carl Skymne
Comment 1 Nick Burch 2009-01-26 05:08:23 UTC
I'm pretty sure this is a bug in your code, and you're not putting the old document out of scope before opening the new one.

However, without any code, we can't know

Please re-open the bug if you can provide your code, and have already checked that you are really allowing objects to go out of scope