{question}
We encountered the following error in our SingleStore cluster:
exception.message: "Leaf Error (10.10.10.10:3306): Stack overflowed during query execution. Specify a bigger stack in the memsql.cnf file by setting the thread-stack engine variable."
How can we address this?
{question}
{answer}
This error indicates that the stack allocated for a query thread has been exceeded for the current workload. To resolve this issue, you need to increase the value of the engine variable (thread_stack
).
Resolution Steps:
Update the configuration with the Toolbox command:
Replace [VALUE]
with the desired stack size (in kilobytes).
Example: 131072
(which is 128 KB)
Important Considerations:
-
Increased Memory Usage:
An increased valuethread_stack
raises memory consumption per thread. Exercise caution if your cluster manages high concurrency. -
Value Must Be Divisible by 1024:
The value must be a multiple of 1024. Configuration validation will reject invalid values. -
Not Settable at Runtime:
This setting requires a node restart.
Steps:-
Take the affected node(s) offline.
-
Use the command above to apply the configuration.
-
Bring the node(s) back online.
-
Best Practices:
-
Test in a Non-Production Environment:
Validate the impact of the change in a staging or development environment before applying it to production. -
Increase Gradually:
Begin with small increments to determine the minimum required value. Avoid setting excessively high values to prevent unnecessary memory overhead.
Need Help?
If you still encounter issues after making the change, please reach out to SingleStore Support for further assistance.
{answer}