Hi, My application uses POI to generate MS Excel Workbooks. Average Size of a Workbook is 30 Col X 1000 Rows X 25 Worksheets (file size is approx 5-6 MB). While doing a stress testing with 30 Concurrent user load, application started throwing java.lang.OutfMemoryError We noticed that there was a Heap Dump and the available memory did not return back to normal. It has been noticed that org.apache.poi.hssf.usermodel.HSSFSheet objects are taking almost 100 MB space. Details of development environment are: #JVM IBM (Wepsphere application Server 5.1) #2 GB available memory (Dedicated)before starting the stress test. #Initial heap size, as set by -Xms paramters is set to 256M. Stress testing process is pretty decent and it closes all 30 sessions after the excel file is generated in each one of them.. so I don't suspect application holding any large objects for a long duration. Please adivce if this is a known issue with HSSF.
What was max heap size? 2GB? In any case, a POI HSSF workbook takes a substantial amount of memory. Reading and writing take additional memory since it has to be done in-memory. Therefore, Out of Memory in concurrent access cannot be considered a bug. If, however, you find memory LEAKS (ie, all memory should be reclaimed by the GC AFTER you loose a reference to a workbook) then that is certainly a bug. There is, of course, a long running feature request to reduce memory usage, but that's waiting for contributions!