We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Creating large PST results in java.lang.OutOfMemoryError


I work with Aaron and I am working on this issue now. The first thing I’d like to do is confirm that you can reproduce a memory leak I am seeing, when using the OutputStream as the first input to PersonalStorage.create method, instead of the String file path. Can you please try your code again using a BufferedOutputStream/FileOutputStream instead of the String as shown below? And when you run using 10k+ messages, can you confirm that the heap usage grows steadily, with an instance of com.aspose.email.ms.System.IO.f holding onto a reference to a very large byte array?

final OutputStream fileOutputStream = new BufferedOutputStream(new FileOutputStream(“D:/LargeOutput.pst”), 8192);

PersonalStorage pst = PersonalStorage.create(fileOutputStream, 0);

Hi Jeff,

We are sorry for a delayed response.

I had to split this thread as this issue is different than as Aaron mentioned earlier. Anyways, after an initial investigation, I was able to observe the issue when some 22K messages were added to PST with Heap size set to 1500M. I have logged this issue for further investigation by our development team under issue id: NETWRKJAVA-33263 and will write back here once there is update or information available in this regard.