Skip to main content
Skip table of contents

Heap Dumps for Directly Executed X4 Installations

To create heap dumps for X4 installations, the startX4.bat file (Windows) or startX4.sh file (Linux) must be changed in the server directory.

How to change the startX4.bat file (Windows)

  1. Open the startX4.bat file in the server directory with a text editor.

  2. Add this command line parameter below the rem ===== set heap memory parameters ===== lines:

    CODE
    @set JAVA_OPTS=%JAVA_OPTS% -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="<PathToStoreTheHeapDump>"

This command line parameter is used to configure the Java application so that it automatically creates a heap dump when a memory shortage occurs.

  1. Adapt the path where the heap dump should be saved.

  1. Only absolute paths are possible.

The startX4.bat file should now look like this with the command line parameter set in line 31:

image-20240528-120544.png
  1. Save the startX4.bat file.

If a memory shortage occurs with the modified startX4.bat file, a file with a name such as java_pid23948.hprof is saved in the specified path. This file contains the heap dump.

How to change the startX4.sh file (Linux)

  1. Open the startX4.sh file in the server directory with a text editor.

  2. Add this command line parameter the startX4.sh file analogous to Windows:

    CODE
    JAVA_OPTS=$JAVA_OPTS -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="<PathToStoreTheHeapDump>"

This command line parameter is used to configure the Java application so that it automatically creates a heap dump when a memory shortage occurs.

  1. Adapt the path where the heap dump should be saved.

  1. Only absolute paths are possible.

  1. Save the file startX4.sh.

If a memory shortage occurs with the modified startX4.bat file, a file with a name such as java_pid23948.hprof is saved in the specified path. This file contains the heap dump.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.