OOM when MboxrdStorageReader read 1GB mbox file

Have 1GB mbox file to convert. But the MboxrdStorageReader reports OOM. I’m wondering how much memory MboxrdStorageReader needs. Is it reading one message a time from the file or trying to read the whole file into memory?

version: aspose-email-18.6-jdk16.jar

current jvm args: host_jvm_args=-Xmx20g --host_jvm_args=-Xms20g

Java heap space
java.lang.OutOfMemoryError: Java heap space
at com.aspose.email.system.io.MemoryStream.setCapacity(Unknown Source)
at com.aspose.email.system.io.MemoryStream.b(Unknown Source)
at com.aspose.email.system.io.MemoryStream.write(Unknown Source)
at com.aspose.email.internal.eg.b.a(Unknown Source)
at com.aspose.email.system.io.Stream.fromJava(SourceFile:223)
at com.aspose.email.MboxrdStorageReader.(SourceFile:87)
at com.google.apps.vault.export.streaming.mail.pst.SandboxedPST.lambda$getMboxReader$6(SandboxedPST.java:135)
at com.google.apps.vault.export.streaming.mail.pst.SandboxedPST$$Lambda$4/1383761509.runInSandbox(Unknown Source)
at com.google.apps.vault.export.streaming.mail.pst.AsposeSandbox.run(AsposeSandbox.java:30)
at com.google.apps.vault.export.streaming.mail.pst.SandboxedPST.getMboxReader(SandboxedPST.java:135)

@jiarongl,

Please try using the latest version Aspose.Email for Java [18.7]. If the issue still persists, please share the mbox file so that we can replicate the issue at our end and assist you further.