A "java.lang.OutOfMemoryError: Java heap space" error and a down status (!) occur in SAS® Environment Manager


Resources display a down status (!) when you navigate to the SAS Environment Manager web console ► Resources ► Browse, which indicates that the SAS Environment Manager Agent does not start.

This issue occurs because the configuration for Java memory is low for the metrics being collected.

As a result, the SAS Environment Manager Agent log in <SAS-configuration-directory>/LevN/Web/SASEnvironmentManager/agent-5.x.0-EE/log/agent.log contains Java heap space errors similar to the following:

ERROR [AgentDiagnostics] [AgentDiagnostics@61] java.lang.OutOfMemoryError: Java heap space

ERROR [SenderThread] [SenderThread@633] Java heap space java.lang.OutOfMemoryError: Java heap space

ERROR [PluginStatusSender] [SystemErr@200] java.lang.OutOfMemoryError: Java heap space

Resolution

Method 1: Increase the initial Java Heap size for SAS Environment Manager Agent 

Completing the following steps might resolve this issue:

  1. When resources display a down status(!), check the agent.log file (located in SAS-configuration-directory/LevN/Web/SASEnvironmentManager/agent-5.x.0-EE/log/) for the errors listed above.
  2. Modify the wrapper.conf file located in <SAS-configuration-directory>/LevN/Web/SASEnvironmentManager/agent-5.x.0-EE/bundles/agent-5.x.0/conf/ as follows:
    1. Locate the following lines:
      wrapper.java.additional.2=-Xmx128m
      wrapper.java.maxmemory=256

    2. Modify these lines as follows:
      wrapper.java.additional.2=-Xmx512m
      #wrapper.java.maxmemory=256

    3. Restart the SAS Environment Manager Agent by executing the following command:
      <SAS-configuration-directory>/LevN/Web/SASEnvironmentManager/agent-5.x.0/bin/hq-agent.sh restart

    4. Repeat these steps on all servers running the SAS Environment Manager Agent.

    5. Open SAS Environment Manager web console ► Resources ► Browse ► Platforms. Then, check that the resources are displayed.

Additional Information

If the issue still occurs after you increase the memory and restart, contact SAS Technical Support and provide the following recent logs: