When an email subscription is triggered, the following error message is printed in the
DSSErrors.log:
2019-03-15 15:11:10.138-05:00 [HOST:mstr-scm-is-1][SERVER:CastorServer][PID:6689][THR:140556856260352][Distribution Service][Error][UID:BC578A8B44B65A4B2242C69896A7376F][SID:22F6F9E45BB48CCBDC197C2B6263884F][OID:51C240F911E8FE0190B40080EFD5B3D4] FAILED SUBSCRIPTION 'Strategy MMR Report (Cloud)': Error Msg: Error sending Secure Email: Email send failed: Mime failed class java.lang.OutOfMemoryError: Java heap space java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOfRange(Arrays.java:3664) at java.lang.String.(String.java:207) at java.lang.String.substring(String.java:1933) at com.Strategy.utils.securemail.FullyFormedMimeHeaderExtractor.(FullyFormedMimeHeaderExtractor.java:63) at com.Strategy.utils.securemail.FullyFormedMimeMessage.(FullyFormedMimeMessage.java:41) at com.Strategy.utils.securemail.Wrapper$SessionWrapper.GetMimeMessage(Wrapper.java:69) at com.Strategy.utils.securemail.EmailSenderUsingTLS.Send(EmailSenderUsingTLS.java:52) at com.Strategy.utils.securemail.Main.SendSecureEmail(Main.java:144) Error sending Secure Email: Email send failed: class java.lang.OutOfMemoryError: Java heap space java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOfRange(Arrays.java:3664) at java.lang.String.(String.java:207) at java.lang.String.substring(String.java:1933) at com.Strategy.utils.securemail.Main$Parameters$Attributes.ExtractParam(Main.java:31) at com.Strategy.utils.securemail.Main$Parameters.(Main.java:82) at com.Strategy.utils.securemail.Main.SendSecureEmail(Main.java:136) Error sending Secure Email: There's an unhandled Java Exception Error sending Secure Email: There's an unhandled Java Exception Error sending Secure Email: There's an unhandled Java Exception Error sending Secure Email: There's an unhandled Java Exception Error sending Secure Email: There's an unhandled Java Exception Error sending Secure Email: There's an unhandled Java Exception Error sending Secure Email: There's an unhandled Java Exception Error sending Secure Email: There's an unhandled Java Exception Error sending Secure Email: There's an unhandled Java Exception Error sending Secure Email: There's an unhandled Java Exception Error sending Secure Email: There's an unhandled Java Exception Error sending Secure Email: There's an unhandled Java Exception Error sending Secure Email: There's an unhandled Java Exception Error Code 0x800647C2. Instance ID = 3B58479111E94721864C0080EF658894, Contact (wxk4084, BC578A8B44B65A4B2242C69896A7376F), User (wxk4084, BC578A8B44B65A4B2242C69896A7376F). Stop in 'hDelivery, Delivery Component of Distribution Service'.
The heap size of JVM used for sending emails is not big enough.
The max heap size of JVM can be configured manually by the registry,
HeapMapSizeInMB.
MSIReg.regfile:
[HKEY_LOCAL_MACHINE\SOFTWARE\MicroStrategy\JNI Bridge\Distribution Service\JVM Options] "HeapMaxSizeInMB"=dword:00000100
HeapMaxSizeInMBunder the following path:
SOFTWARE\Wow6432Node\MicroStrategy\JNI Bridge 64\Distribution Service\JVM Options
If there is no
HeapMaxSizeInMBin the registry, the default value is 256M. If the value set in the registry is less than 256M, then 256M is used. This value only affects JVM in email subscriptions.
HeapMaxSizeInMBis printed in
SecureEmail Trace.

If there is no
SecureEmailin diagnostics tool, you can add it in the registry and reopen diagnostic tools.
MSIREG.reg
[HKEY_LOCAL_MACHINE\SOFTWARE\MicroStrategy\Log Destinations\SecureEmailTrace] "MaxSize"=dword:00005000 "Type"=dword:00000003
SOFTWARE\Wow6432Node\MicroStrategy\Diagnostics\Log2:
