Skip to main content
This topic describes how to troubleshoot FE heap memory issues in the database.

Sudden surge of heap memory allocation

You can identify issues that cause sudden heap memory allocation surge by checking memory profiles (or memory allocate profiles) in the database. From v3.3.6 onwards, the database supports printing memory profiles in .tgz-formatted compressed HTML files under directory fe/log/proc_profile. FE Memory FAQ - 1 You can find the corresponding file based on the time when the memory issue occurred, decompress it, and open it in your browser. In the file, you will see the flame graph of the stack memory allocation. The wider a frame, the more memory resources the stack had been allocated to. For example, in the flame graph below, the width of frame BDBEnvironment.getDatabaseNamesWithPrefix exceeds 50% of the graph, indicating that more than half of the memory resources were allocated to this function. FE Memory FAQ - 2 If no memory profile was printed during the surge, you can manually disable the CPU profile, and set the profile printing interval to 5 minutes by setting the following items in the FE configuration file fe.conf, and restarting FE.

Workaround for versions earlier than v3.3.6

For versions earlier than v3.3.6, you can print memory profiles regularly via a script. Run the following Shell script under the fe directory:

Slow increase of heap memory usage

From v3.3.7 onwards, the database supports printing Memory Usage Tracker logs for tracking memory leak issues. Memory Usage Tracker will regularly record the memory usage of each module. Example: