Troubleshooting Memory Issues
  • 27 Mar 2022
  • 2 Minutes to read
  • Dark
    Light

Troubleshooting Memory Issues

  • Dark
    Light

Out-of-Memory Issues

When building an ElastiCube with connectors that use the JVM framework, you might receive an "out of memory" error. This could be a result of your computer not having enough memory allocated to run all the necessary processes, or your computer might need more RAM. For more information about minimum requirements, see Linux Minimum Requirements

Determine whether internal or system connectors are used
First determine whether internal or system connectors are used, as the procedure for allocating more memory for each is different.
To determine whether the data group uses system or internal connectors:

  1. Open the file explorer (Admin > Data Management > Data Groups or https:///app/settings#/datagroups).

  2. Click the Edit icon of the group. The Edit Data Group window is displayed.

    Edit Data Group.png

  3. Note the Connector Running Mode (Internal or System) to determine which instructions to follow below.

To allocate more memory to the JVM process:
For Internal connectors:

  1. Navigate to Admin > System Management > Configuration > (5 clicks on the logo) > Build-Connector.
  2. Set the required MaximumMemoryLimit value.
    MaximumMemoryLimit.png

For System connectors:

  1. Open the file explorer (Admin >System Management > File Management or https://<app>/app/explore).

  2. Navigate to the connectors folder and open the configuration.json file.

  3. In the line that starts with "jvmParameters:" , look for a parameter concatenated to '-Xmx', such as '-Xmx2G' or '-Xmx500M'. This parameter indicates the maximal heap size of the JVM. For example:

    "jvmParameters": ["-Xmx8g", "-server", "-Dfile.encoding=UTF-8"],

    If this parameter does not exist, the heap size is the default one-third of the computer's RAM. To modify the default size, paste the command from step 2 into your configuration.json file.

  4. Modify the -Xmx value according to your needs.
    For additional description about this parameter, click here.

  5. For Linux deployments:
    The JVM runs inside a pod, so the pod's memory limit should be updated to match or exceed the updatedJVM Xmx memory limit. To change the pod’s memory limit:
    a. Edit the Connector pod’s deployment settings:

     `kubectl -n sisense edit deployment connectors`
    

    b. In the Limits section, set the Memory value to at least the same size as the JVM memory.

  6. Restart the JVM service.
    - kubectl -n sisense delete pod -l app=connectors

  7. Verify that the JVM parameters you specified were accepted. The JVM parameter values are in the Command Line column for the Java processes.

For Linux:

  1. Run this command:

    kubectl exec $(kubectl -n sisense get pod -l app=connectors -o custom-columns=":.metadata.name")-n sisense -- ps -eo args --no-headers | grep ContainerLauncherApp | awk '{print $10 " " $2}'

  2. Check the connectors container during a build:

    kubectl exec $(kubectl get po -l mode=build -o custom-columns=":.metadata.name,:.spec.containers[1].name" --no-headers -n sisense| awk '{print $1" -c " $2}') -n sisense -- ps -eo args --no-headers | grep ContainerLauncherApp | awk '{print $10 " " $2}'

  3. Check that all the connectors are running and that the JVM value is correct.

High Memory Consumption Due to Many Active Connectors

If you have many active connectors, you might experience memory consumption issues. To control the number of active connectors, disable unused connectors.

Note:

This issue was solved for Linux with an updated connectors architecture. To apply the new connectors architecture to your Linux deployment, see New Connectors Framework.

  1. Navigate to /opt/sisense/storage/connectors/ to open the usedConnectors.json file.

  2. Add or remove connectors to the usedConnectors.json file.

  3. Set the Custom connectors field to:

    FALSE - All connectors are active
    TRUE - Only connectors in the "displayConnectors" are active

    Note:

    Only active connectors consume memory.

  4. Restart the Connectors pod:

    kubectl -n sisense delete pod -l app=connectors


Was this article helpful?