Bug 46602 - out.of.mem exception when performing batch import of document structure
Summary: out.of.mem exception when performing batch import of document structure
Alias: None
Product: POI
Classification: Unclassified
Component: POI Overall (show other bugs)
Version: 3.1-FINAL
Hardware: PC Windows Server 2003
: P2 major (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2009-01-26 04:11 UTC by Carl Skymne
Modified: 2009-01-26 05:08 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Carl Skymne 2009-01-26 04:11:47 UTC

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).

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