Category / Section
How to Troubleshoot SingleStore (MemSQL) Memory Allocation Issues
Published:
When executing complex queries or when the server usage is high, you may encounter an error message similar to the following:
Sf_Exception - There was an error executing the query SELECT ...
Reason: Leaf Error (node-69c429fb-cee3-440e-bd08-d171349ea295-leaf-ag1-0.svc-69c429fb-cee3-440e-966e-288d144525a4:3306): Memory used by MemSQL (26342.38 Mb) has reached the 'maximum_memory' setting (26542 Mb) on this node. Possible causes include (1) available query execution memory has been used up for table memory (in use table memory: 134.00 Mb) and (2) the query is large and complex and requires more query execution memory than is available (in use query execution memory 25019.63 Mb).
This error indicates that the maximum memory allocated for SingleStore (formerly known as MemSQL) has been reached while querying the SingleStore.
Causes
- The query is large and complex, requiring more query execution memory than is available.
- Available query execution memory has been used up for table memory.
Solution
To resolve this issue, you can adjust the memory settings in your memsql.cnf
file for each node based on the physical host memory capacity when SingleStore is installed.
Follow the steps in the official SingleStore documentation to change the memory allocation:
Changing SingleStoreDB’s Memory Limits After Modifying System Memory Capacity