<@U0A71G31CDV> From the documentation certain conf...
# questions-and-troubleshooting
t
@Rocky From the documentation certain configurations are set in the
fe.conf
or
cn.conf
but it seems that certain configs like
enable_profile_log
are only mentioned in the
SET enable_profile_log
context (from runtime) and adding
enable_profile_log=true
to either/both my
fe.conf
or
cn.conf
files is not respected. How can I have this persistently set at startup?
r
In StarRocks, there are two distinct types of configurations, and the method for making them persistent depends on which type they belong to. Based on your description, you are likely encountering System Variables, which behave differently from Configuration Items. 1. System Variables (Session/Global) Variables like
enable_profile
(and potentially
enable_profile_log
depending on your version) are System Variables. * Why
fe.conf
doesn't work:
These variables are managed via the SQL interface and stored in the FE's metadata (BDBJE), not in the configuration files. Any entries for these in
fe.conf
will be ignored. * How to persist: To set these persistently across cluster restarts and for all new sessions, you must use the
SET GLOBAL
command:
Copy code
sql
    SET GLOBAL enable_profile = true;
Once set as
GLOBAL
, the value is written to the edit logs and will remain active even after a cluster restart. 2. FE/BE Configuration Items Parameters listed in the FE Configuration or BE Configuration documentation (like
sys_log_level
or
enable_collect_query_detail_info
) are true configuration items. * How to persist: These are set in
fe.conf
or
cn.conf
. * Runtime change: Many of these are "mutable," meaning you can change them without a restart using the
ADMIN
command:
Copy code
sql
    ADMIN SET FRONTEND CONFIG ("enable_collect_query_detail_info" = "true");
Specifics for
enable_profile_log
The variable
enable_profile_log
was introduced in newer versions (v3.1+) specifically to control the
fe.profile.log
(a JSON-formatted log file for query analysis). * If you want to enable the Profile Web UI/Metadata collection (the most common request), use:
Copy code
sql
    SET GLOBAL enable_profile = true;
* If you specifically want to enable the JSON profile log files (
fe.profile.log
) and find that
fe.conf
isn't picking it up, try setting it via the admin interface to verify if your version supports it as a mutable config:
Copy code
sql
    ADMIN SET FRONTEND CONFIG ("enable_profile_log" = "true");
Summary Tip: If a setting is changed via
SET
, use
SET GLOBAL
to persist it. If it is changed via
ADMIN SET CONFIG
or mentioned as an FE/BE parameter, use `fe.conf`/`be.conf`. Referencessql-reference/System_variable.mdadministration/management/FE_configuration.mdadministration/management/logs.mdbest_practices/query_tuning/query_profile_overview.mdfaq/Others.mdunloading/Spark_connector.md
r
add
enable_profile_log = true
in your fe.conf (all FEs) and restart the FEs. This will change the value