ERROR 2408 (HY000): ER_ COMPILATION_ TIMEOUT: Query compilation timed out and cannot be executed
Note
Please note, the full error text is Query compilation timed out and cannot be executed.
Issue
A query compilation timeout occurs when the max_
has been reached.query_
.max_
threshold again.
Solutions
-
Clear the kill flag by resetting
max_
to it's current or higher value on the master aggregator.compilation_ time_ s SET GLOBAL max_compilation_time_s = 601;Query OK, 0 rows affected (0.02 sec)
SELECT @@max_compilation_time_s;+--------------------------+ | @@max_compilation_time_s | +--------------------------+ | 601 | +--------------------------+ 1 row in set (0.00 sec)
Note
If an asynchronous compile limit is being reached, its worthwhile to investigate why and optionally increase the limit to be above the threshold of the queries that are triggering it.
-
Set
interpreter_
session variable tomode mbc
orcompile_
so the query will interpret only.lite Then try running the query again. SET SESSION interpreter_mode = mbc;Query OK, 0 rows affected (0.02 sec)
SELECT @@interpreter_mode;+--------------------+ | @@interpreter_mode | +--------------------+ | mbc | +--------------------+ 1 row in set (0.00 sec)
SET SESSION interpreter_mode = compile_lite;Query OK, 0 rows affected (0.02 sec)
SELECT @@interpreter_mode;+--------------------+ | @@interpreter_mode | +--------------------+ | compile_lite | +--------------------+ 1 row in set (0.00 sec)
-
View the query plan to find out which parts of the query are taking the longest time to execute.
Optimize that part of your query statement. See EXPLAIN, PROFILE, or SingleStore Visual Explain for more details.
Last modified: August 16, 2023