EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB484392: Failed email subscription due to out-of-memory error of JVM


Ran Cai

Software Engineer, Senior • MicroStrategy


This article explains why emails are unable to send when an email subscription is triggered and JVM memory is insufficient. This article also provides a solution, which includes manually configuring the max heap size.

Description 


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

Why is this happening? 


The heap size of JVM used for sending emails is not big enough. 

Solution 


The max heap size of JVM can be configured manually by the registry,

HeapMapSizeInMB
. 
 

  • In Linux, add the following entry in the
    MSIReg.reg
    file:
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\MicroStrategy\JNI Bridge\Distribution Service\JVM Options]
    "HeapMaxSizeInMB"=dword:00000100

  • In Windows, add DWORD value named
    HeapMaxSizeInMB
    under the following path:
    SOFTWARE\Wow6432Node\MicroStrategy\JNI Bridge 64\Distribution Service\JVM Options

If there is no

HeapMaxSizeInMB
in 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. 
Please remember to restart the Intelligence Server after changing the registry value. 
The current setting for JVM
HeapMaxSizeInMB
is printed in
SecureEmail Trace
. 

ka0PW0000000wK9YAI_0EM2R000001I30n.jpeg

If there is no

SecureEmail
in diagnostics tool, you can add it in the registry and reopen diagnostic tools. 
For example, in a default machine:

  • In Linux, add this entry in
    MSIREG.reg

    
    [HKEY_LOCAL_MACHINE\SOFTWARE\MicroStrategy\Log Destinations\SecureEmailTrace]
    "MaxSize"=dword:00005000
    "Type"=dword:00000003
    

  • In Windows, add this under
    SOFTWARE\Wow6432Node\MicroStrategy\Diagnostics\Log2
    :
ka0PW0000000wK9YAI_0EM2R000001I312.jpeg

Comment

0 comments

Details

Knowledge Article

Published:

July 8, 2020

Last Updated:

February 26, 2024