kushagra.dubey
08/20/2026, 7:05 AMRocky
08/20/2026, 7:06 AMmeta out of date. current time: ..., synchronized time: ... shows a synchronized time that is roughly 9 hours behind the current time. This means the FE is replaying a massive amount of historical metadata journals.
2. Slow Journal Replay: The warning replay journal cost too much time: 1001 replayedJournalId: 20143584 indicates that the "replayer" thread is processing journals very slowly (about 1 second per batch). Since the replayedJournalId is increasing in your logs, the FE is actually progressing, but it has millions of entries to catch up on.
3. Checkpoint Failure: The most likely cause is that your FE failed to create a "checkpoint" (an image file) for a long time. When an FE restarts, it must replay all journals since the last image file. If no image was created for 9 hours, the startup will take hours.
4. Waiting to Register: The message Waiting to register as follower usually comes from a startup wrapper script (common in K8s/Docker) that waits for the FE to reach a stable state. Because the FE is busy replaying logs, it hasn't reached the "Ready" state yet.
Recommended Steps
1. Monitor Progress
Check if the replayedJournalId is still increasing in your fe.log.
* If it is increasing: The FE is not "dead"; it is just busy. You can estimate how long it will take by seeing how many journals are left.
* If it is stuck: The replayer thread might be blocked (possibly by Disk I/O or GC).
2. Check the Metadata Directory
Check the meta/image and meta/bdb directories on your FE pods:
* Look at the latest file in meta/image/. If the timestamp is very old, it confirms the checkpointing failure.
* Check the size of meta/bdb/. If it is many gigabytes, it confirms there are too many logs to replay.
3. Address Resource Constraints
Journal replay is CPU and Memory intensive. Check your K8s pod resources:
* Increase JVM Heap: Ensure your FE has enough memory (at least 8GB-16GB recommended). Checkpoint failures are often caused by Full GC preventing the FE from writing the image file.
* Check Disk I/O: Slow journal replay is often caused by slow disk performance on the metadata volume.
4. Force a Leader (If the cluster is stuck)
If all FE pods are stuck as FOLLOWER and none become LEADER after a reasonable wait, the election group might be corrupted or unable to reach a quorum.
1. Identify the pod with the most recent metadata (the one with the highest replayedJournalId).
2. Stop all FE pods.
3. Add the following line to the fe.conf of that one pod:
properties
bdbje_reset_election_group = true
4. Restart that pod. It should force itself to become the Leader.
5. Important: Once it becomes Leader, remove that line from fe.conf and restart it again, then bring up the other FEs as followers.
5. "Miss meta block [20001]"
This specific warning is common after an upgrade to StarRocks 3.x. It indicates the FE is looking for new metadata structures that don't exist yet in your old image. This is generally non-fatal and can be ignored once the cluster is stable.
Summary
Your FEs are likely not crashed, but are "frozen" while catching up on 9 hours of missed metadata. If the replayedJournalId is moving, the safest path is to wait. If you cannot wait, you may need to perform a Metadata Recovery by resetting the election group on the node with the latest data.
References
• administration/Meta_recovery.mdkushagra.dubey
08/20/2026, 7:18 AMRocky
08/20/2026, 7:19 AMsynchronized time: 1787176067828).
2. Slow Progress: The replay journal cost too much time: 1001 warnings show that the replayer is processing journals slowly. At roughly 1,000 IDs per second, replaying millions of entries will take hours.
3. FE-1 has Failed: Crucially, on FE-1, the replayer thread has crashed:
ERROR (replayer|144) [Daemon.run():110] daemon thread exits. name=replayer.
This node is now unhealthy and will not catch up or participate in elections until restarted and the root cause (often OutOfMemory or disk issues) is fixed.
4. No Leader: Because FE-1 is down and FE-0/FE-2 are still replaying old data, the cluster cannot reach a "Ready" state or form a quorum.
5. Restart Loop: The Waiting to register as follower, retrying... message suggests a startup script is waiting for the FE to become healthy. If this script has a timeout, it might be restarting the FE process repeatedly, preventing it from ever finishing the 9-hour replay.
Recommended Recovery Steps
1. Check for Resource Issues (FE-1)
Check the fe.log on FE-1 specifically for the lines immediately before the daemon thread exits error. Look for a Java Stack Trace or java.lang.OutOfMemoryError.
* Action: If it's an OOM, you must increase the JVM heap size (-Xmx in fe.conf) for all FE nodes to handle the large metadata backlog.
2. Identify the Node with the Latest Data
Compare the replayedJournalId in the latest logs of all pods:
* FE-0: ~20,173,145
* FE-1: ~20,177,688 (Crashed)
* FE-2: ~20,191,867 (Most advanced)
FE-2 has the most recent metadata.
3. Force a Leader Election (Manual Recovery)
Since the cluster is stuck and one node's replayer has exited, you likely need to force one node to become the leader to break the cycle.
1. Scale down or stop all FE pods/processes.
2. On the node with the most recent data (FE-2), add this line to your `fe.conf`:
properties
metadata_failure_recovery = true
_(Note: In older versions, this might be bdbje_reset_election_group = true. Check your version, but metadata_failure_recovery is the modern standard for forcing a leader.)_
3. Start FE-2 only. It should ignore the other nodes and force itself to become the LEADER.
4. Check the fe.log of FE-2. Once it says transfer to LEADER, immediately remove the metadata_failure_recovery line from fe.conf.
5. Restart FE-2 again (without the recovery flag).
6. Start FE-0 and FE-1. They should now join FE-2 as followers and sync metadata from it.
Warning on the "Waiting to register" Loop
If you are running on Kubernetes, ensure your Liveness/Readiness probes are not killing the pods while they are replaying journals. Replaying 9 hours of logs is a heavy operation; if the pod is killed and restarted halfway through, it will start from the last checkpoint again, leading to an infinite loop. You may need to temporarily increase the initialDelaySeconds or failureThreshold of your probes.
References
• administration/Meta_recovery.md
• faq/loading_faq.md (General FE Troubleshooting)kushagra.dubey
08/20/2026, 7:31 AMRocky
08/20/2026, 7:32 AMUNKNOWN state after scaling down to one pod is that StarRocks requires a quorum (a majority of nodes) to elect a leader. In a cluster originally configured with 3 FE nodes, a single node cannot form a quorum by itself and will wait indefinitely for others to join.
To force this single node to become the leader and start the cluster, follow these recovery steps:
Phase 1: Force Leader Recovery
1. Stop the FE-0 pod.
2. Edit the fe.conf file for FE-0 and add the following line:
properties
metadata_failure_recovery = true
3. Start the FE-0 pod.
4. Monitor the fe.log. You are looking for a log entry that says:
notify new FE type transfer: LEADER
Note: It will still need to replay those 9 hours of journals you saw earlier. This might still take some time, but it should now progress.
Phase 2: Cleanup and Cluster Expansion
Once the FE-0 pod successfully transfers to LEADER and is able to accept SQL queries (check via mysql client):
1. Remove the flag: Edit fe.conf again and remove the line metadata_failure_recovery = true.
2. Restart FE-0: Restart the pod one more time without the flag. This is a critical step to prevent metadata issues later.
3. Check Image Creation: In the MySQL client, run:
sql
SHOW FRONTENDS;
Ensure the node is IsMaster: true. Then, force a new checkpoint to shrink the journal backlog:
sql
ALTER SYSTEM CREATE IMAGE;
4. Re-scale the cluster: You can now scale your FE pods back up to 3. The other nodes will join as followers and sync the fresh image from FE-0.
Important Troubleshooting Notes
* Replayer Crashes: In your previous logs, FE-1's replayer thread crashed. This is almost always caused by an OutOfMemoryError. Ensure your FE pods have at least 8GB-16GB of JVM Heap (configured via -Xmx in fe.conf) to handle the large metadata replay.
* Probe Timeouts: If you are on Kubernetes, the pod might restart itself if the Liveness or Readiness probes fail while it's busy replaying logs. Temporarily increase the initialDelaySeconds or failureThreshold of your probes to give the FE time to finish its startup.
References
• administration/Meta_recovery.md
References
• administration/Meta_recovery.mdkushagra.dubey
08/20/2026, 7:35 AMRocky
08/20/2026, 7:35 AMmetadata_failure_recovery has been replaced by a more specific one for resetting the BDBJE election group.
Updated Recovery Steps for v4.0.9:
1. Stop the FE-0 pod.
2. Edit fe.conf and use this specific parameter instead:
properties
bdbje_reset_election_group = true
_(Note: Using the old metadata_failure_recovery = true may not work or is deprecated in 4.x versions.)_
3. Start the FE-0 pod.
* Since you have scaled down to 1 pod, this flag will force this single pod to ignore the "missing" majority and elect itself as the LEADER.
* Monitor fe.log. It will likely still spend a significant amount of time replaying those 9+ hours of journals. Do not interrupt it while it is replaying, or you may risk metadata corruption.
4. Verify Leader Status:
Once the logs show transfer to LEADER, log in via a MySQL client and run:
sql
SHOW FRONTENDS;
Ensure the node is Alive: true and Role: LEADER.
5. CRITICAL: Remove the flag.
After the FE is successfully running as Leader, remove bdbje_reset_election_group = true from fe.conf and restart the FE pod one more time.
If you leave this flag in, the FE will reset its election group every time it restarts, which will prevent other FEs from joining correctly later.
6. Scale back up:
Once FE-0 is stable and the flag is removed, you can scale your FE deployment back to 3 pods. The new pods will automatically join as followers.
Why this is happening in 4.0.9
Because your cluster was originally a 3-node HA cluster, StarRocks requires 2 nodes to be healthy to perform any operations. By scaling down to 1 pod, you took away the "quorum." The bdbje_reset_election_group flag tells the remaining node to "forget" the old 3-node group and start a new group where it is the sole member/leader.
References
• administration/Meta_recovery.md (See the version-specific notes for v3.3+)kushagra.dubey
08/20/2026, 7:43 AMconfig: |
LOG_DIR = /opt/starrocks/fe/log
DATE_FORMAT = %Y-%m-%d %H:%M:%S
# Shared-data mode: store all data in GCS
run_mode = shared_data
cloud_native_meta_port = 6090
enable_load_volume_from_conf = true
cloud_native_storage_type = S3
max_query_num = 1000
query_timeout = 300
query_port = 9030
sys_log_level = WARN
sys_log_roll_interval = DAY
sys_log_roll_num = 10
sys_log_delete_age = 1d
sys_log_roll_mode = SIZE-MB-512
sys_log_enable_compress = true
audit_log_modules = slow_query
audit_log_roll_num = 5
audit_log_roll_interval = DAY
audit_log_delete_age = 30d
dump_log_delete_age = 1d
feature_log_delete_age = 1d
enable_profile = false
query_detail_size = 100
enable_collect_full_statistic = false
enable_statistic_collect = false
enable_statistic_collect_on_first_load = false
iceberg_worker_num_threads = 8
lake_batch_publish_max_version_num = 16
max_running_txn_num_per_db = 1000
publish_version_max_threads = 64
query_deploy_threadpool_size = 80Rocky
08/20/2026, 7:44 AMconfig block in your Helm chart.
How to apply it via Helm:
1. Add the flag: Update your values.yaml (or the specific configuration section in your chart) to include the line:
yaml
config: |
bdbje_reset_election_group = true
LOG_DIR = /opt/starrocks/fe/log
# ... rest of your config
2. Apply the change: Run helm upgrade to update the ConfigMap and restart the FE pod.
3. Monitor the logs:
* Use kubectl logs -f <fe-pod-name> to watch the replay process.
* Wait until you see: notify new FE type transfer: LEADER.
4. CRITICAL - Remove the flag immediately:
Once the FE is a LEADER, you must remove that line from your Helm chart and run helm upgrade again.
* Why? If you leave it in, every time the FE pod restarts (due to node maintenance or crashes), it will wipe its knowledge of the other FE nodes, preventing you from ever scaling back up to a 3-node High Availability cluster.
Important note for shared_data mode:
Since you are running in shared_data mode (Cloud-Native), your table data is in GCS, but your metadata (the journal/edit logs) is still stored on the local Persistent Volume (PV) assigned to the FE pod. This recovery flag only affects those local metadata logs.
Summary of the full workflow:
1. Scale to 1 FE replica (already done).
2. Add bdbje_reset_election_group = true to Helm config and helm upgrade.
3. Wait for the FE to finish replaying logs and become LEADER.
4. Remove the flag from Helm config and helm upgrade.
5. Scale back to 3 FE replicas.
One final check: Ensure your FE pod's Liveness/Readiness probes in the Helm chart are not too aggressive. Because you have a large metadata backlog (9+ hours), the FE might take 10-30 minutes to finish replaying. If K8s kills the pod because it's not "Ready" yet, it will never finish the recovery. You may want to temporarily increase the initialDelaySeconds for your probes.kushagra.dubey
08/20/2026, 7:54 AMRocky
08/20/2026, 7:55 AMfe.log to know if it is working:
1. The Success Marker
You are waiting for this specific line:
text
notify new FE type transfer: LEADER
Once you see this, the recovery is successful. The FE is now the master of the cluster and you can connect to it via MySQL.
2. The Progress Marker (Journal Replay)
Since your previous logs showed a 9-hour gap, the FE must replay all those logs before it can become the Leader. Look for lines like:
text
replayed journal id 123456...
If you see these numbers increasing, the FE is working through the backlog. Do not restart the pod while this is happening, as interrupting a massive replay can sometimes lead to metadata inconsistencies.
3. Potential Errors to Watch For
If it is still stuck in UNKNOWN or crashing, please check for these common errors:
* EnvironmentFailureException: This usually means the BDBJE metadata on disk is corrupted.
* InsufficientLogException: This happens if the journals needed for recovery were already cleaned up.
* IP/FQDN Mismatch: If you are not using FQDNs and the pod's IP changed during the scale-down, BDBJE might refuse to start because it doesn't recognize itself in the metadata.
Please paste the last 50-100 lines of your fe.log if it is still not reaching the LEADER state.
Reminder: The "Safety" Step
As soon as you see transfer to LEADER, you must:
1. Remove bdbje_reset_election_group = true from your Helm chart.
2. Run helm upgrade to restart the pod without the flag.
Failure to do this will cause the FE to reset its group again on the next restart, which will prevent you from scaling back up to 3 replicas.Rocky
08/20/2026, 7:55 AMnotify new FE type transfer: LEADER. This means the node has successfully forced itself to become the master of the cluster.
2. Metadata Replay in Progress: The GlobalStateMgr.waitForReady warning is appearing because the FE is currently replaying those 9 hours of journal logs you had earlier. Replaying a large volume of metadata takes time, and while it is replaying, the FE remains in an "initializing" state.
3. The "UNKNOWN" Thread Name: Even though the underlying election layer is a LEADER, the StarRocks application thread still labels itself as UNKNOWN until the replay is finished and it is 100% ready to serve traffic.
What to do now:
* Wait: Do not restart the pod or change any settings. Replaying 9 hours of journals can take anywhere from 10 to 30 minutes (or longer depending on the number of transactions and disk speed).
* Watch for Progress: Keep tailing the fe.log. Look for lines that mention replayed journal id: XXXXX. If that number is increasing, the FE is healthy and working through the backlog.
* Check the Query Port: Once the replay is finished, you will see a log entry like Finished to replay journal and the FE will start listening on port 9030.
When to worry:
If the logs stop moving entirely for more than 15 minutes or you see an OutOfMemoryError, then the replayer is stuck. Given your 9-hour backlog, the most common issue is that the FE needs more memory. If it crashes, increase the JVM Heap size (-Xmx) in your Helm chart and try again.
Summary: You have successfully cleared the "no quorum" hurdle. Now you just need to let the FE finish its homework (replaying the logs) before it can fully start up.
Next Step (Once it's running): As soon as you can connect via MySQL, remember to remove the bdbje_reset_election_group flag from your Helm chart and update, otherwise you won't be able to add the other 2 replicas back safely.
References
• administration/Meta_recovery.mdkushagra.dubey
08/20/2026, 7:55 AMRocky
08/20/2026, 7:55 AMnotify new FE type transfer: LEADER: This is a success. It means the bdbje_reset_election_group flag worked, and this single FE has successfully elected itself as the Leader of a new 1-node group.
2. Miss meta block [20001]: This is a common informational warning in StarRocks 4.0. It usually occurs because your metadata image doesn't contain certain new feature blocks (like StarManager or RBAC updates) that the new version expects. As the log says, "This may not be a fatal error." It will continue past this.
3. GlobalStateMgr.waitForReady() ... It took too much time: This is the most important part. It is a timeout warning telling you that the FE has been trying to start for several minutes but isn't "Ready" to serve queries yet.
* In your case, this is expected because you have 9 hours of journal logs to replay.
* The FE must finish replaying every single one of those journals before it transitions from UNKNOWN to LEADER at the application level.
Critical Next Steps:
1. Do NOT restart the pod: The replay process is happening in the background. If you restart it, it has to start replaying from the last image file all over again.
2. Check for Progress: Run the following command inside the FE pod (or tail the log) to see if it is actually replaying:
bash
grep "replayed journal id" /opt/starrocks/fe/log/fe.log | tail -n 5
If the journal id numbers are increasing, the recovery is working perfectly. You just need to wait.
3. Verify Kubernetes Probes:
Check kubectl describe pod <fe-pod-name>. If you see "Liveness probe failed" or "Restarts: 1", Kubernetes is killing the FE because it thinks it’s stuck.
* Action: If it's restarting, you must temporarily increase the initialDelaySeconds or failureThreshold of your FE Liveness and Readiness probes in your Helm chart to give it 30–60 minutes to finish the replay.
4. Monitor Resources: Ensure the FE pod has enough CPU and Memory. Replaying 9 hours of logs is CPU-intensive. If the pod hits an OOM (Out of Memory), you will need to increase the FE JVM heap size.
Summary: Your FE has successfully cleared the "no quorum" state. It is now simply "doing its homework" by replaying the 9-hour backlog. Once it finishes, the UNKNOWN in your logs will change to LEADER, and port 9030 will open.
References
• administration/Meta_recovery.md (See StarRocks metadata damage section)
References
• administration/Meta_recovery.mdkushagra.dubey
08/20/2026, 7:58 AMRocky
08/20/2026, 7:58 AMMiss meta block [20001], the FE has just started reading the image.XXXX file from your disk.
* The Warning is Normal: The Miss meta block [20001] warning is standard in newer versions (like 3.3+ or 4.0). It just means your current metadata image doesn't have specific "Cloud Native" or "RBAC" blocks that the new version expects. It is not an error and will not stop the process.
* Silent Period: During the time the FE is loading the image into memory, it does not log every single row it reads. If your metadata image is large (hundreds of MBs or GBs), this phase can take 5 to 10 minutes with no log output at all.
2. How to tell if it's actually working
Since you've only waited about a minute (based on the timestamps), it's likely just busy. You can verify it's alive by running this from your terminal:
* Check CPU Usage:
bash
kubectl top pod <fe-pod-name>
If the FE pod is using significant CPU (e.g., 100% of a core or more), it is actively loading the metadata into memory.
* Check Memory Usage:
Ensure the memory isn't flatlining at its limit. If it hits the limit, it might be stuck in a "GC loop" (Garbage Collection).
* Check for Crashes:
bash
kubectl get pod <fe-pod-name>
If RESTARTS is 0 and the state is Running, it’s still working.
3. What comes next?
Once the image is loaded, you will suddenly see a burst of logs like this:
1. Finished to load image in XXX ms
2. start to replay journal from id XXX to YYY
3. The Journal Replay: This is where it will process those 9 hours of missing data. You will see lines like replayed journal id: 123456.
Summary Recommendation:
Wait at least 15 minutes. With a 9-hour backlog and a large image, the FE is doing a lot of heavy lifting in the background. As long as the pod doesn't restart, it is making progress.
One Warning: If the pod does restart, check kubectl logs -p <pod-name> (previous logs). If you see java.lang.OutOfMemoryError, you will need to increase the FE memory in your Helm chart before it can successfully load this much metadata.
References
• administration/Meta_recovery.mdkushagra.dubey
08/20/2026, 8:00 AMRocky
08/20/2026, 8:01 AMbash
kubectl describe pod starrocks-fe-0
Look for the Last State: Terminated section:
* If Reason is `OOMKilled`: Your FE doesn't have enough RAM to load the metadata image and the 9-hour journal backlog.
* Fix: Increase the Memory Request/Limit in your Helm chart and increase the -Xmx value in FE_JVM_OPTS.
* If Reason is Completed or Error (and you see Liveness probe failures in Events): Kubernetes killed the FE because it took too long to start.
* Fix: You must temporarily disable or significantly extend your probes (see Step 2).
Step 2: Fix Probe Timeouts (The most likely cause)
During a metadata recovery, the FE is "live" but not "ready." Kubernetes will kill it if the livenessProbe doesn't get a response. Since replaying 9 hours of journals can take 30+ minutes, you need to adjust your Helm chart:
yaml
# In your values.yaml or FE spec
livenessProbe:
initialDelaySeconds: 300 # Increase to 5-10 minutes
periodSeconds: 30
failureThreshold: 60 # Increase threshold so it allows for 30+ mins of startup
readinessProbe:
initialDelaySeconds: 300
periodSeconds: 30
failureThreshold: 60
Alternatively, you can temporarily remove the probes from the deployment just to let the recovery finish.
Step 3: Check the "Last Words"
Check the logs of the container that just crashed:
bash
kubectl logs starrocks-fe-0 -p
If you see an error like java.lang.OutOfMemoryError: Java heap space, then the OOMKilled diagnosis is confirmed. You will need to give the FE more memory to handle the large metadata volume.
Summary of Action Plan:
1. Increase FE Memory: If it's an OOM, double the RAM.
2. Extend Probes: Set failureThreshold to a very high number (e.g., 100) to give the FE 1 hour to finish replaying logs without being killed.
3. Keep the Flag: Keep bdbje_reset_election_group = true until the FE successfully starts and you can run a query. Only then should you remove it.
Do not worry about the Miss meta block [20001] warning; it is normal and not what is causing the restart. The restart is happening because the FE is taking too long to finish its internal work.
References
• administration/Meta_recovery.md
References
• administration/Meta_recovery.mdkushagra.dubey
08/20/2026, 8:02 AMRocky
08/20/2026, 8:03 AMEvents section confirms the issue: Kubernetes is killing your FE because the startupProbe is failing.
text
Warning Unhealthy ... Startup probe failed: Get "<http://10.4.12.23:8030/api/health>": connection refused
Normal Killing ... Container fe failed startup probe, will be restarted
Why this is happening:
The StarRocks FE does not open its HTTP port (8030) or its MySQL port (9030) until after it has finished loading the metadata image and replaying all journal logs.
Because you have 9 hours of logs to replay, the FE is taking longer than the startupProbe allows. Every time the probe fails enough times, Kubernetes kills the FE and starts the replay from zero again, putting you in an infinite loop.
How to fix it:
You need to give the FE much more time to "warm up" during this recovery. You have two options:
Option 1: Increase the Startup Probe (Recommended)
Modify your StarRocks FE deployment (or Helm values.yaml) to increase the failureThreshold.
For example, to give it 1 hour to recover:
yaml
startupProbe:
httpGet:
path: /api/health
port: 8030
periodSeconds: 10
failureThreshold: 360 # 360 * 10 seconds = 60 minutes
Option 2: Temporarily Disable Probes (Fastest for recovery)
If you want to fix this immediately without calculating times, you can edit the deployment directly and remove the startupProbe and livenessProbe sections:
1. kubectl edit statefulset starrocks-fe
2. Scroll down to the containers: section.
3. Find and delete the startupProbe and livenessProbe blocks.
4. Save and exit.
What to do next:
Once you have extended or removed the probes:
1. The pod will start and stay running (no more Killing events).
2. Monitor the logs: kubectl logs -f starrocks-fe-0.
3. You will eventually see: Finished to load image... followed by thousands of lines saying replayed journal id: XXXXX.
4. Wait. Once the last journal is replayed, the FE will open port 8030/9030, and the pod will finally show as READY 1/1.
Note: Since you are using the property bdbje_reset_election_group = true, once the FE is finally READY, remember to remove that property from your configuration so it doesn't try to reset the group every time it restarts in the future.kushagra.dubey
08/20/2026, 8:06 AMstartupProbe:
failureThreshold: 60
httpGet:
path: /api/health
port: 8030
scheme: HTTP
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 1Rocky
08/20/2026, 8:06 AMfailureThreshold significantly. Give it at least 30 to 60 minutes to be safe. Since your periodSeconds is 5, you should set the threshold to 720 (for 1 hour).
Update your configuration to this:
yaml
startupProbe:
failureThreshold: 720 # 720 * 5s = 3600s (1 hour)
httpGet:
path: /api/health
port: 8030
scheme: HTTP
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 5 # Increased slightly to be safe
Why this is necessary:
1. Metadata Loading: The FE first reads the image file into memory. It does not open port 8030 during this time.
2. Journal Replay: After loading the image, it must replay every transaction from the last 9 hours. If you have a high-traffic cluster, this could be hundreds of thousands of entries.
3. Port Opening: The FE only starts listening on port 8030 after the replay is 100% finished.
If Kubernetes kills the FE at minute 6, all the progress it made replaying those journals is lost, and it starts from the beginning again on the next restart. This is why you are seeing the restart loop.
How to verify progress after applying the change:
Once you increase the threshold and the pod stops restarting, run:
bash
kubectl logs -f starrocks-fe-0
You should see it eventually move past the "Miss meta block" warning and start printing lines like:
replayed journal id: 12345...
As long as those IDs are increasing, the FE is healthy and working. Do not manual restart it; just let it finish the replay until it finishes.kushagra.dubey
08/20/2026, 8:15 AMRocky
08/20/2026, 8:15 AMstartupProbe change worked. You have successfully broken the restart loop.
The warnings you are seeing now:
It took too much time for FE to transfer to a stable state(LEADER/FOLLOWER)
...are expected when you have a massive amount of journal logs (9 hours) to replay. The FE is currently in a "Leader" role but it is not yet "Ready" because it is still busy reconstructing the database state in memory from those logs.
Is it actually making progress?
To confirm the FE isn't just stuck, you need to check if the Journal ID is increasing.
1. Check the logs for replay progress:
Run this command and look for "replayed journal id":
bash
kubectl logs starrocks-fe-0 | grep "replayed journal id"
Note: StarRocks usually logs this every 1,000 to 10,000 entries. If you don't see it immediately, wait a minute and check again.
2. Check CPU Usage:
bash
kubectl top pod starrocks-fe-0
If CPU usage is high (e.g., 100% of a core or more), the FE is actively replaying logs.
Why it takes so long:
* 9 hours of journals: Depending on your cluster's write load, this could be millions of edit log entries.
* Single-threaded replay: Replaying these journals into the memory state is largely a single-threaded process.
* Safe State: The FE will not open the MySQL port (9030) or return OK to health checks until the very last journal entry is processed.
What you should do:
1. Wait. Do not restart the pod. Every time you restart it, it has to start replaying those 9 hours of logs from the very beginning.
2. Monitor the logs. As long as you don't see OutOfMemoryError or a crash, it is working.
3. Check the Image file: Look at the timestamp of the image file in the metadata directory if you can (via kubectl exec). If it's very old, it confirms that the FE has a lot of "catching up" to do because a checkpoint hasn't happened recently.
How will you know it's done?
The warnings will stop, and you will see a log entry saying:
finished to open edit log, current max journal id: XXXXX
At that point, the startupProbe will finally succeed, the pod will show 1/1 READY, and you can connect via MySQL.
Once it is READY:
Remember to remove bdbje_reset_election_group = true from your configuration so that it doesn't trigger a group reset on the next normal restart.
References
• administration/Meta_recovery.md
• deployment/deploy_manually.md
References
• administration/Meta_recovery.mdkushagra.dubey
08/20/2026, 8:19 AMRocky
08/20/2026, 8:19 AMtext
slow edit log write, batch size: 1, took: 2027ms
This is the most critical log. It means it took over 2 seconds just to write a single entry to the metadata journal.
* Why this matters: StarRocks FE metadata is persistent. Every time the Leader does something (like starting up, cleaning up, or handling a request), it must write to this log.
* The Impact: Since you are replaying 9 hours of journals, if the disk is this slow, the "finalizing" stage of the startup will take a very long time. This is likely why the FE hasn't opened port 8030 yet—it's stuck waiting for disk writes to complete during its initialization.
* Check your Disk: Since you are on GKE, check if you are using pd-standard (HDD) or pd-ssd. For StarRocks metadata, SSD is highly recommended. If the disk is under heavy "IO Pressure," the FE will appear hung.
2. "SocketException: Socket closed"
These Thrift errors are usually secondary. They happen because:
* The FE has started its internal RPC services, and other components (like your BEs or external monitoring) are trying to connect.
* Because the FE is so bogged down by the slow disk writes (the 2-second lag), it is failing to respond to those connections in time, or the connections are timing out and being closed by the other side.
What you should do now:
1. Do not restart: You have already passed the "election" phase (it is now LEADER). If you restart now, you will lose the progress it made and start the slow BDB election/replay all over again.
2. Monitor the progress:
Check the number of files in the metadata journal directory:
bash
kubectl exec starrocks-fe-0 -- ls -l /opt/starrocks/fe/meta/bdb
If you see the timestamps updating or new files appearing, the FE is alive and moving, just very slowly.
3. Check for "Ready" status:
The FE will only open port 8030 (passing the startupProbe) after it finishes these initial slow writes and fully initializes its internal state.
4. Check for CPU/Memory exhaustion:
bash
kubectl top pod starrocks-fe-0
If memory is near the limit, it might be swapping or performing heavy Garbage Collection, which also slows down disk I/O.
Summary: Your FE is no longer in a restart loop, but it is "limping" due to slow disk performance. It should eventually become ready, but the 2-second write latency is a serious bottleneck. If this is a production cluster, you may need to upgrade the underlying PV to a faster disk type (SSD) once you get the cluster back online.
References
• administration/management/FE_configuration.md
• administration/management/monitoring/metrics.mdkushagra.dubey
08/20/2026, 8:22 AMRocky
08/20/2026, 8:22 AMSocketException happens because the FE is too "starved" of CPU to respond to internal network heartbeats, causing other components to drop the connection.
3. Slow Replay: Replaying 9 hours of journals involves heavy Java object de-serialization, which is very CPU-intensive.
Recommended Action:
You should increase the CPU limit immediately.
* Temporary Fix for Recovery: Bump the CPU limit to 8 or 12 cores if your node has the capacity. This will allow the FE to "burst" and finish replaying those journals much faster.
* Guaranteed Resources: Set your CPU requests equal to your limits. This prevents other pods on the same node from "stealing" cycles that the FE needs for metadata integrity.
Example Update:
yaml
resources:
requests:
cpu: "8"
memory: "16Gi" # Ensure memory is also sufficient
limits:
cpu: "8"
memory: "16Gi"
Why 4 CPUs isn't enough right now:
While 4 CPUs might be enough for a "quiet" cluster, during a massive metadata recovery (like replaying 9 hours of logs), the FE has to do a huge amount of work to reconstruct the state in memory.
Summary:
By hitting the CPU limit, you are making a 1-hour recovery process take 5+ hours (or never finish). Increase the CPU, and you will see those "slow edit log write" warnings disappear, and the FE should become READY shortly after.
Check for Throttling:
You can verify this by running:
bash
kubectl describe pod starrocks-fe-0
Look for "Terminated" reasons or check the node's metrics to see if container_cpu_cfs_throttled_seconds_total is climbing.
References
• administration/management/FE_configuration.md
• administration/management/monitoring/metrics.mdkushagra.dubey
08/20/2026, 8:25 AMRocky
08/20/2026, 8:26 AMbdbje_reset_election_group = true, you have told this specific pod: "Forget about all other nodes; you are the only source of truth." It is currently rebuilding the entire database state from the journal.
2. Overhead: If you add replicas now, the Leader (which is already struggling and CPU-throttled) would have to spend extra resources trying to communicate with and replicate data to those new pods. This will only slow down the recovery.
3. Clean Slate: When you eventually do add replicas, they must start with a completely empty metadata directory so they can perform a "Remote Bootstrap" (download the clean metadata from your current Leader).
The Recommended Path:
Step 1: Increase resources for the 1 pod
Give it as much CPU and Memory as your K8s nodes can spare (e.g., 8 or 16 CPUs). This will stop the "slow edit log write" errors and speed up the 9-hour journal replay.
Step 2: Wait for "1/1 READY"
Wait until the logs show:
finished to open edit log, current max journal id: XXXXX
And the pod status becomes READY. At this point, your data is safe and the FE is functional.
Step 3: Remove the Recovery Flag
1. Edit your configuration to remove bdbje_reset_election_group = true.
2. Restart the single pod. It will start up quickly this time because the journals have already been replayed.
Step 4: Scale up to 3 replicas
Only after the first pod is stable and the recovery flag is gone should you scale the replicas back to 3.
* Note: If you are using the StarRocks Operator, it should handle the joining process. If you are doing it manually, ensure the new pods are started with the --helper flag pointing to the first pod's IP.
Summary: For now, more CPU for the single pod is the fastest way to get your cluster back online. Adding more pods now will only complicate the recovery.
References
• administration/Meta_recovery.md
• administration/management/FE_configuration.md
• deployment/helm_chart_usage.md
• administration/Meta_recovery.md
References
• administration/management/FE_configuration.md
• administration/Meta_recovery.mdkushagra.dubey
08/20/2026, 8:31 AMRocky
08/20/2026, 8:31 AMvalues.yaml file. This is the best way to ensure the changes persist and that the Operator doesn't revert your manual kubectl edit changes.
Here is the structure you should use in your Helm values file (assuming you are using the official kube-starrocks chart):
Example values.yaml for Recovery
yaml
starrocks:
starrocksFESpec:
replicas: 1 # Keep at 1 until recovery is finished
resources:
requests:
cpu: "8" # Increase this to stop throttling
memory: "16Gi"
limits:
cpu: "8"
memory: "16Gi"
# Increase the startupProbe timeout to prevent K8s from killing the pod
# while it is replaying the 9-hour journal.
startupProbe:
httpGet:
path: /api/bootstrap
port: 8030
periodSeconds: 10
failureThreshold: 300 # 10s * 300 = 50 minutes of allowed startup time
# Ensure your recovery flag is still present here
configParameters:
bdbje_reset_election_group: "true"
Why these values?
1. CPU Requests = Limits: In GKE/K8s, setting these equal ensures the pod gets "Guaranteed" QoS, meaning other pods on the node cannot steal the CPU cycles your FE needs for its heavy metadata replay.
2. failureThreshold: Setting this to a high number (like 300 or 600) gives the FE a massive window to finish its work without being restarted. Even if the FE is "stuck" for 30 minutes replaying logs, K8s will wait patiently as long as the probe hasn't exceeded the threshold.
How to apply:
Run your helm upgrade with the new values:
bash
helm upgrade <release_name> starrocks/kube-starrocks -f values.yaml
Warning:
Once the FE is finally READY and you can log in via MySQL, remember to:
1. Set bdbje_reset_election_group: "false" (or remove it).
2. Upgrade the chart again.
3. Only then, scale replicas back to 3.
References
• deployment/helm_chart_usage.md
• quick_start/helm.md
• administration/Meta_recovery.md
• administration/management/FE_configuration.md
References
• quick_start/helm.md
• deployment/sr_operator.mdRocky
08/20/2026, 9:34 AMtextPayload in your logs is empty, we need to look at how the container is dying.
An empty textPayload often happens when the process is killed by the OS (Kubernetes) before it can even write a log entry about why it is failing.
Please check these three things immediately:
1. Check for OOMKilled (Out of Memory)
Replaying 9 hours of metadata is extremely memory-intensive. If your memory limit is too low, the Linux kernel will kill the process (OOMKill).
* Run this: kubectl get pod <fe-pod-name> -o yaml
* Look for: lastState: terminated and check if the reason is OOMKilled.
* Fix: If it says OOMKilled, increase your memory limit in Helm to at least 16Gi or 32Gi for this recovery period.
2. Is the livenessProbe killing it?
In your Helm chart, you likely have both a startupProbe and a livenessProbe.
* If the startupProbe finishes, but the FE is still doing heavy background work and doesn't respond to the livenessProbe quickly enough, Kubernetes will restart it.
* Action: Increase the failureThreshold or initialDelaySeconds for your livenessProbe as well, or disable it temporarily during the recovery.
3. Check the JVM Heap configuration
If you increased the Pod's memory limit but didn't increase the FE Java Heap size, the FE will crash with an "Out of Memory Error" internally.
* Check your fe.conf (or the configParameters in Helm).
* Ensure -Xmx is set to about 80% of your pod's memory limit.
_ _Example:* If the pod has 16Gi memory, set JAVA_OPTS to include -Xmx12g.
4. BDBJE Lock Files
If the FE crashed hard, sometimes a je.lck file is left in the meta/bdb directory. Usually, the FE can override this on restart, but in rare cases, it prevents startup.
* Check the fe.warn.log or fe.log inside the pod (if you can exec in before it restarts) for any mention of LockTimeoutException or File not found.
Next Step to diagnose:
Since the GCP log you shared is empty, please run this command to see the actual reason Kubernetes stopped the last container:
bash
kubectl describe pod <fe-pod-name>
Look at the "Containers" section, specifically the "Last State" and "Exit Code".
* Exit Code 137: Means OOMKilled or SIGKILL (K8s killed it).
* Exit Code 143: Means SIGTERM (K8s stopped it gracefully, likely a probe failure).
* Exit Code 1: Means the Java process crashed itself (check fe.log).
What did the Last State say in the kubectl describe output?
References
• administration/management/FE_configuration.md
• administration/Meta_recovery.md
• deployment/helm_chart_usage.md
• administration/management/monitoring/metrics.md
References
• administration/management/FE_configuration.md
• administration/Meta_recovery.md
• administration/management/monitoring/metrics.mdkushagra.dubey
08/20/2026, 9:34 AMRocky
08/20/2026, 9:35 AMvalues.yaml to include JAVA_OPTS inside the configParameters. If your Pod has 16Gi of memory, set the Heap (-Xmx) to about 12Gi (roughly 75-80% of the total).
yaml
starrocks:
starrocksFESpec:
resources:
requests:
cpu: "8"
memory: "16Gi"
limits:
cpu: "8"
memory: "16Gi"
configParameters:
# This is the critical line to fix the OutOfMemoryError
JAVA_OPTS: "-Xmx12g -Xms12g -XX:+UseG1GC"
# Keep your recovery flag active
bdbje_reset_election_group: "true"
Why this is happening:
1. Metadata in RAM: StarRocks keeps all metadata in memory. Replaying 9 hours of journals means the FE is trying to load a massive amount of data into the JVM Heap at once.
2. Container vs. JVM: Kubernetes limits the container's memory, but the Java process has its own internal limit (-Xmx). If -Xmx is not set, Java often defaults to a fraction of the available memory, which isn't enough for a large metadata recovery.
What to check next:
1. Apply the change: helm upgrade <release> ...
2. Verify the JVM setting: Once the pod starts, you can verify it's using the new limit by running:
bash
kubectl exec starrocks-fe-0 -- ps aux | grep java
Look for -Xmx12g in the command output.
3. Monitor the logs: You should see the journal replay progress further now. If it crashes with OOM again even at 12GB, you may need to increase the Pod to 32Gi and set JAVA_OPTS to -Xmx24g.
Important: If the journal replay takes a long time, ensure your startupProbe.failureThreshold is still set high (e.g., 600) so Kubernetes doesn't kill the pod while it's busy loading the metadata.
References
• faq/fe_mem_faq.md
• administration/management/FE_configuration.md
• faq/Others.md
• administration/Meta_recovery.md
References
• administration/management/FE_configuration.md
• faq/Others.md
• administration/Meta_recovery.md
• faq/fe_mem_faq.md
References
• quick_start/helm.md
• sql-reference/sql-functions/JAVA_UDF.md
• faq/Others.mdkushagra.dubey
08/20/2026, 9:37 AMRocky
08/20/2026, 9:37 AMexport JAVA_OPTS="-Xmx5g -Xms2g"
The FE is trying to replay 9 hours of journals, which requires loading a lot of metadata into RAM. When it hits that 5GB limit, it throws the OutOfMemoryError and restarts.
How to fix it:
You need to edit your Helm chart's command/script to use more of the available 16Gi. Change that line to:
bash
export JAVA_OPTS="-Xmx12g -Xms12g"
Why these values?
1. -Xmx12g: This gives the FE 12GB of heap space. Since your Pod limit is 16Gi, this leaves ~4GB for the operating system and non-heap memory, which is safe.
2. -Xms12g: Setting the starting memory (Xms) equal to the maximum (Xmx) is a StarRocks best practice. It prevents the JVM from wasting time resizing the memory while it's trying to recover your metadata.
Recommendation for Recovery:
If 12GB still fails (replaying 9 hours of journals is very heavy), I strongly recommend bumping the resources even higher just for this recovery phase:
* Pod Memory Limit: 32Gi
* JAVA_OPTS: "-Xmx24g -Xms24g"
Once the FE is back online and "Healthy," you can scale these back down to your normal production values.
Don't forget: After you update the Helm chart and the FE starts, check the fe.log to confirm it is successfully "replaying" the journal entries. You should see progress messages showing the journal IDs being processed.
References
• faq/fe_mem_faq.md
• administration/Meta_recovery.md
• administration/management/FE_configuration.md
• faq/Others.md
References
• knowledge/trouble_shooting/fe_memory_problems.md
• administration/Meta_recovery.mdkushagra.dubey
08/20/2026, 9:41 AMadmin set frontend config("tablet_create_timeout_second"="20")
or add the following configuration to the fe.conf file and restart the process:
tablet_create_timeout_second=20
at com.starrocks.task.TabletTaskExecutor.waitForFinished(TabletTaskExecutor.java:423) ~[starrocks-fe.jar:?]
at com.starrocks.task.TabletTaskExecutor.sendCreateReplicaTasksAndWaitForFinished(TabletTaskExecutor.java:309) ~[starrocks-fe.jar:?]
at com.starrocks.task.TabletTaskExecutor.buildPartitionsSequentially(TabletTaskExecutor.java:111) ~[starrocks-fe.jar:?]
at com.starrocks.server.LocalMetastore.buildPartitions(LocalMetastore.java:2012) ~[starrocks-fe.jar:?]
at com.starrocks.server.LocalMetastore.addPartitions(LocalMetastore.java:1358) ~[starrocks-fe.jar:?]
at com.starrocks.server.LocalMetastore.addPartitions(LocalMetastore.java:971) ~[starrocks-fe.jar:?]
at com.starrocks.service.FrontendServiceImpl.createPartitionProcess(FrontendServiceImpl.java:2251) ~[starrocks-fe.jar:?]
at com.starrocks.service.FrontendServiceImpl.createPartition(FrontendServiceImpl.java:2086) ~[starrocks-fe.jar:?]
at com.starrocks.thrift.FrontendService$Processor$createPartition.getResult(FrontendService.java:6705) ~[starrocks-fe.jar:?]
at com.starrocks.thrift.FrontendService$Processor$createPartition.getResult(FrontendService.java:6682) ~[starrocks-fe.jar:?]
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:40) ~[libthrift-0.20.0.jar:0.20.0]
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:40) ~[libthrift-0.20.0.jar:0.20.0]
at com.starrocks.common.SRTThreadPoolServer$WorkerProcess.run(SRTThreadPoolServer.java:313) ~[starrocks-fe.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:840) ~[?:?]
2026-08-20 093959.386Z WARN (thrift-server-pool-11|1608) [TabletTaskExecutor.waitForFinished():408] Table creation timed out. unfinished replicas(1/1): 22609910(starrocks-cn-2.starrocks-cn-search.trino.svc.cluster.local) timeout=10s
2026-08-20 093959.386Z WARN (thrift-server-pool-11|1608) [FrontendServiceImpl.createPartitionProcess():2257] failed to add partitions
com.starrocks.common.DdlException: Table creation timed out. unfinished replicas(1/1): 22609910(starrocks-cn-2.starrocks-cn-search.trino.svc.cluster.local) timeout=10s
You can increase the timeout by increasing the config "tablet_create_timeout_second" and try again.
To increase the config "tablet_create_timeout_second" (currently 10), run the following command:
admin set frontend config("tablet_create_timeout_second"="20")
or add the following configuration to the fe.conf file and restart the process:
tablet_create_timeout_second=20
at com.starrocks.task.TabletTaskExecutor.waitForFinished(TabletTaskExecutor.java:423) ~[starrocks-fe.jar:?]
at com.starrocks.task.TabletTaskExecutor.sendCreateReplicaTasksAndWaitForFinished(TabletTaskExecutor.java:309) ~[starrocks-fe.jar:?]
at com.starrocks.task.TabletTaskExecutor.buildPartitionsSequentially(TabletTaskExecutor.java:111) ~[starrocks-fe.jar:?]
at com.starrocks.server.LocalMetastore.buildPartitions(LocalMetastore.java:2012) ~[starrocks-fe.jar:?]
at com.starrocks.server.LocalMetastore.addPartitions(LocalMetastore.java:1358) ~[starrocks-fe.jar:?]
at com.starrocks.server.LocalMetastore.addPartitions(LocalMetastore.java:971) ~[starrocks-fe.jar:?]
at com.starrocks.service.FrontendServiceImpl.createPartitionProcess(FrontendServiceImpl.java:2251) ~[starrocks-fe.jar:?]
at com.starrocks.service.FrontendServiceImpl.createPartition(FrontendServiceImpl.java:2086) ~[starrocks-fe.jar:?]
at com.starrocks.thrift.FrontendService$Processor$createPartition.getResult(FrontendService.java:6705) ~[starrocks-fe.jar:?]
at com.starrocks.thrift.FrontendService$Processor$createPartition.getResult(FrontendService.java:6682) ~[starrocks-fe.jar:?]
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:40) ~[libthrift-0.20.0.jar:0.20.0]
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:40) ~[libthrift-0.20.0.jar:0.20.0]
at com.starrocks.common.SRTThreadPoolServer$WorkerProcess.run(SRTThreadPoolServer.java:313) ~[starrocks-fe.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:840) ~[?:?]
2026-08-20 093959.454Z WARN (thrift-server-pool-14|1626) [DefaultCoordinator.updateRuntimeProfile():1245] exec state report failed status=errorCode RUNTIME_ERROR automatic create partition failed. error:Table creation timed out. unfinished replicas(1/1): 22609910(starrocks-cn-2.starrocks-cn-search.trino.svc.cluster.local) timeout=10s
You can increase the timeout by increasing the config "tablet_create_timeout_second" and try again.Rocky
08/20/2026, 9:41 AMtablet_create_timeout_second to 60 or 120 seconds to give the system breathing room during this recovery phase.
In your Helm values.yaml, add this to the configParameters section of your FE:
yaml
starrocksFESpec:
configParameters:
# ... your other configs ...
tablet_create_timeout_second: "120"
2. Check the Health of your CN Pods
The logs specifically mention starrocks-cn-2.starrocks-cn-search.trino.svc.cluster.local as the node failing to respond. If the CNs are overwhelmed or restarting, the FE cannot finish creating the partitions.
* Check Pod Status: kubectl get pods -n trino -l <http://app.kubernetes.io/component=cn|app.kubernetes.io/component=cn>
* Check CN Logs: kubectl logs -f starrocks-cn-2 -n trino
* Look for "Out of Memory" errors or high CPU usage in the CN logs. If the CNs are also crashing, you may need to increase their memory limits as well.
3. Verify CN Registration
Since you just recovered the FE metadata, ensure the FE actually "sees" the CNs as alive. Connect to the FE via MySQL and run:
sql
SHOW COMPUTE NODES;
Look at the Alive column. If it says false for any node, the FE won't be able to create tablets on them.
Why this is happening now:
* Backlog: While the FE was down for 9 hours, any "Routine Load" or "Insert" jobs were queued. Now they are all hitting the FE at once.
* Dynamic Partitioning: If your tables use dynamic partitioning, the FE is likely trying to create dozens of partitions for the "missed" time windows all at once.
* Resource Contention: If your CNs are also on the same GKE nodes as the FE, the heavy journal replay might have starved them of resources.
Summary of Action:
1. Set tablet_create_timeout_second: "120" in your Helm FE config.
2. Restart/Update the FE.
3. Verify the CNs are healthy and Alive: true in SHOW COMPUTE NODES.
References
• administration/management/FE_configuration.md
• faq/Sql_faq.md
• faq/loading/Routine_load_faq.md
• administration/management/BE_configuration.md
References
• administration/management/FE_configuration.md
• faq/loading/Routine_load_faq.md
• faq/Sql_faq.md
References
• administration/management/FE_configuration.md
• faq/Sql_faq.md
• faq/loading/Routine_load_faq.md
• administration/management/BE_configuration.md
References
• administration/management/FE_configuration.md
• faq/Sql_faq.md
• administration/management/BE_configuration.md
• faq/loading/Routine_load_faq.md
• faq/shared_data_faq.mdkushagra.dubey
08/20/2026, 1:15 PMRocky
08/20/2026, 1:16 PMsql
SHOW FRONTENDS;
Confirm that starrocks-fe-0 (or whichever pod is up) has Role: LEADER and Alive: true. Because you used bdbje_reset_election_group: "true", this FE has "forgotten" about the other two FEs.
Step 2: Prepare for Scaling in Helm
Update your values.yaml. You need to do two things at once:
1. Set replicas back to 3.
2. Remove or set bdbje_reset_election_group to "false". If you leave it as true, the pods will constantly try to reset the group and won't be able to form a 3-node quorum.
yaml
starrocks:
starrocksFESpec:
replicas: 3 # Scale back to 3
configParameters:
bdbje_reset_election_group: "false" # CRITICAL: Set to false
JAVA_OPTS: "-Xmx12g -Xms12g" # Keep the high memory
tablet_create_timeout_second: "120" # Keep the higher timeout
Step 3: Clear Old Metadata for the New FEs (Highly Recommended)
Since you performed a "hard reset" on the leader's metadata group, the old data sitting on the disks (PVCs) of fe-1 and fe-2 is now technically from a "different" timeline. They will likely fail to join fe-0 if they try to use their old data.
Before you run the Helm upgrade, delete the PVCs for the other two FEs so they start completely fresh and sync from the Leader:
bash
# Verify the PVC names first
kubectl get pvc -n trino
# Delete the PVCs for FE 1 and 2 (the operator will recreate them)
kubectl delete pvc <metadata-pvc-name-for-fe-1> -n trino
kubectl delete pvc <metadata-pvc-name-for-fe-2> -n trino
Step 4: Apply the Changes
Run your Helm upgrade:
bash
helm upgrade <release-name> starrocks/starrocks -f values.yaml -n trino
Step 5: Monitor the Join Process
1. FE-0 will restart: Since you changed the bdbje_reset_election_group parameter, the operator will restart fe-0. It should come back up as LEADER again.
2. FE-1 and FE-2 will start: They will see they have no data (because you cleared the PVCs), and they will automatically contact fe-0 to join the cluster.
3. Check Status: Wait a few minutes and run:
sql
SHOW FRONTENDS;
You should eventually see all 3 FEs with Alive: true, one LEADER, and two `FOLLOWER`s.
Summary of why these steps matter:
* Flag Removal: If bdbje_reset_election_group stays true, the cluster can never have more than 1 node.
* PVC Deletion: If you don't clear the old PVCs for fe-1/2, you will likely see HANDSHAKE_ERROR in the logs because their internal BDBJE "Node ID" doesn't match the new group created by your reset.
References
• administration/Meta_recovery.md
• administration/management/FE_configuration.md
• deployment/sr_operator.md
• quick_start/helm.md
References
• administration/Meta_recovery.md
• administration/management/FE_configuration.md
• deployment/sr_operator.md
• quick_start/helm.md
References
• administration/Meta_recovery.md
• administration/management/FE_configuration.md
• deployment/sr_operator.mdRocky
08/20/2026, 1:16 PMkushagra.dubey
08/20/2026, 1:19 PMRocky
08/20/2026, 1:19 PMbash
kubectl get pods -n trino -o custom-columns=NAME:.metadata.name,RESTARTS:.status.containerStatuses[0].restartCount,LAST_STATE:.status.containerStatuses[0].lastState.terminated.reason,EXIT_CODE:.status.containerStatuses[0].lastState.terminated.exitCode
* Reason: OOMKilled (Exit Code 137): The Pod exceeded its Kubernetes memory limit.
* Reason: Error (Exit Code 1): The process crashed internally (check the logs for "OutOfMemoryError" or "Segmentation Fault").
2. Why the CNs are crashing
Your logs showed starrocks-cn-2 failing to create tablets. If the CN is crashing with Exit Code 137 (OOMKilled):
* Cause: The CN is likely trying to process a massive influx of data from Routine Loads that resumed as soon as the FE became leader.
* Solution: Increase the CN memory limits in your Helm chart. If your FE needs 16Gi, your CNs (which do the actual heavy lifting) likely need 32Gi or 64Gi depending on your data volume.
3. Immediate Stability Strategy
To stop the crashing and let the cluster stabilize, you should reduce the load until the metadata replay and tablet creation are finished:
1. Pause Routine Loads: If you can get a MySQL connection for even a minute, pause your heavy loading jobs:
sql
PAUSE ROUTINE LOAD FOR <job_name>;
-- Or pause all if you have many:
PAUSE ALL ROUTINE LOAD;
2. Increase CN Memory: Update your Helm chart to give CNs more RAM. StarRocks CNs are very memory-intensive.
yaml
starRocksCnSpec:
requests:
memory: "32Gi"
limits:
memory: "32Gi"
3. Check CN Logs for "Segmentation Fault": If the CN exit code is NOT 137, look at the end of the CN log (kubectl logs starrocks-cn-2 -n trino). If you see Segmentation Fault or Signal 11, it might be a specific bug related to the version or a corrupted tablet, and you should check the cn.out file inside the pod.
4. Check for Node-Level Pressure
If both FE and CN are on the same physical GKE node, the FE's journal replay (which is CPU and I/O intensive) might be causing the CN to fail its Liveness/Readiness probes.
* Check if the nodes themselves are under pressure: kubectl top nodes.
* If the nodes are at 90%+ memory, Kubernetes will start killing pods to save the node.
Summary of Action:
1. Confirm if it's OOMKilled using the kubectl command in Step 1.
2. If yes, double the memory for both FE and CN pods in your Helm chart.
3. Temporarily stop data ingestion (Routine Load/Stream Load) to let the FE finish its metadata tasks.
References
• administration/management/FE_configuration.md
• faq/loading/Routine_load_faq.md
• knowledge/trouble_shooting/fe_deadlock_problems.mdkushagra.dubey
08/20/2026, 1:44 PMRocky
08/20/2026, 1:45 PMfe-log-...).
There is a big difference between "Metadata" and "Logs" in StarRocks:
1. Metadata PVC (Required to delete for followers)
* Contents: BDBJE database files, journal logs (not text logs), and the FE image.
* Why delete: This is where the cluster "identity" and data state live. Since you performed a metadata reset on the leader, the old metadata on fe-1 and fe-2 is now incompatible. They must start with an empty metadata directory to "handshake" correctly and download the new state from the leader.
2. Log PVC (Optional to delete)
* Contents: Human-readable text files like fe.log, fe.warn.log, and fe.audit.log.
* Why it's optional: These files are just for troubleshooting. They have no impact on whether an FE can join the cluster or not.
* Recommendation: Keep them unless you are running out of disk space. They might contain useful history about why the pods were crashing earlier.
Summary of Actions for FE-1 and FE-2:
1. Delete Metadata PVCs: kubectl delete pvc <prefix>-meta-<pod-name> — Mandatory.
2. Delete Log PVCs: kubectl delete pvc <prefix>-log-<pod-name> — Optional (only if you want a totally clean slate).
Important Note on Terminology:
Inside the meta directory, there is a folder often called bdb. BDBJE refers to its internal data files as "logs" (e.g., 00000001.jdb). These are not the same as the application logs in your Log PVC. By deleting the Metadata PVC, you are already clearing these internal BDBJE logs.
References
• administration/Meta_recovery.md
• administration/management/logs.md
• administration/management/FE_configuration.md
• quick_start/helm.md
References
• administration/Meta_recovery.md
• administration/management/logs.md
• administration/management/FE_configuration.md
• quick_start/helm.md
References
• administration/Meta_recovery.md
• administration/management/logs.md
• administration/management/FE_configuration.md
• quick_start/helm.md
• administration/Cluster_administration.md
References
• administration/Meta_recovery.md
• administration/management/logs.md
• administration/management/FE_configuration.md
• quick_start/helm.md
• administration/Cluster_administration.md
• faq/Sql_faq.md
• faq/loading/Routine_load_faq.md
• faq/shared_data_faq.md
• administration/management/BE_configuration.md
• deployment/sr_operator.md
• knowledge/trouble_shooting/fe_deadlock_problems.mdRocky
08/20/2026, 1:45 PMkushagra.dubey
08/20/2026, 2:23 PM2026-08-20 14:20:55.543Z WARN (ProcProfileCollector|62) [ProcProfileCollector.lambda$collectCPUProfile$2():128] collect cpu profile failed, reason: Profiler has not started
2026-08-20 14:20:56.947Z WARN (starrocks-http-pool-10|312) [HttpServerHandler$RequestHandlingWatch.finish():254] receive slow http request. uri: /api/bootstrap?cluster_id=*&token=*, startTime: 1787235645437, latency: 11510 ms
2026-08-20 14:20:56.947Z ERROR (ProcProfileCollector|62) [Daemon.run():100] daemon thread got exception. name: ProcProfileCollector
java.lang.RuntimeException: Failed to collect CPU profile
at com.starrocks.memory.ProcProfileCollector.collectCPUProfile(ProcProfileCollector.java:129) ~[starrocks-fe.jar:?]
at com.starrocks.memory.ProcProfileCollector.runAfterCatalogReady(ProcProfileCollector.java:61) ~[starrocks-fe.jar:?]
at com.starrocks.common.util.FrontendDaemon.runOneCycle(FrontendDaemon.java:78) ~[starrocks-fe.jar:?]
at com.starrocks.common.util.Daemon.run(Daemon.java:98) ~[starrocks-fe.jar:?]
Caused by: java.lang.IllegalStateException: Profiler has not started
at one.profiler.AsyncProfiler.execute0(Native Method) ~[async-profiler-4.0.jar:?]
at one.profiler.AsyncProfiler.execute(AsyncProfiler.java:186) ~[async-profiler-4.0.jar:?]
at com.starrocks.memory.ProcProfileCollector.collectCPUProfile(ProcProfileCollector.java:126) ~[starrocks-fe.jar:?]
... 3 more
kushagra@Kushagras-MacBook-Pro ~ %Rocky
08/20/2026, 2:24 PMProcProfileCollector error you are seeing is likely a red herring. While it looks like a crash, it is a background diagnostic thread (new in v3.2+) that tries to collect CPU profiles for the Web UI. If it fails, it logs an error but typically doesn't crash the entire FE process.
The actual cause of your restarts is revealed in the second log line:
receive slow http request. uri: /api/bootstrap ... latency: 11510 ms
Why your pods are restarting:
1. Liveness Probe Failure: The StarRocks Operator and Kubernetes use the /api/bootstrap (or /api/health) endpoint to check if the FE is alive.
2. Backlog Pressure: Because your FE is replaying a 9-hour metadata backlog, it is extremely busy and its internal locks are frequently held. This causes the HTTP server to respond very slowly (11.5 seconds in your log).
3. The Kill Switch: The default Kubernetes/Operator timeout for these checks is often 5 or 10 seconds. When the FE takes 11.5 seconds to respond, Kubernetes marks it as "Unhealthy" and kills the pod.
4. The Loop: The pod restarts, starts replaying the 9-hour backlog again, gets stuck/slow again, and gets killed again. You are in a "Replay-Restart Loop."
How to fix it:
1. Increase Probe Timeouts (The Priority)
You must give the FE more "breathing room" to finish its metadata replay. Update your Helm values.yaml to increase the liveness and readiness probe initial delays and timeouts:
yaml
starrocksFESpec:
livenessProbe:
initialDelaySeconds: 300 # Wait 5 mins before starting checks
periodSeconds: 30
timeoutSeconds: 30 # Increase from 5s to 30s
failureThreshold: 10 # Allow more consecutive failures
readinessProbe:
initialDelaySeconds: 300
periodSeconds: 30
timeoutSeconds: 30
failureThreshold: 10
2. Disable the Background Profiler
To reduce any unnecessary CPU overhead while the cluster is struggling, disable the feature causing that ProcProfileCollector error in your fe.conf (via configParameters in Helm):
yaml
starrocksFESpec:
configParameters:
proc_profile_cpu_enable: "false"
proc_profile_mem_enable: "false"
3. Monitor the Replay Progress
Instead of looking at the Profiler error, look for these lines in your `fe.log`:
* replayed journal id: ...
* catch up to journal id: ...
As long as the "replayed journal id" is increasing, the FE is working. If the pod restarts before the "replayed" number reaches the "catch up" number, you must increase the timeoutSeconds and failureThreshold further.
Summary
The ProcProfileCollector error is a secondary symptom of a stressed system. The Slow HTTP Request is what's triggering Kubernetes to kill your pods. Fix the probe settings to let the FE finish its work.
References
• administration/management/proc_profile.md
• administration/management/FE_configuration.md
• deployment/sr_operator.md
• administration/Meta_recovery.md
References
• administration/management/monitoring/metrics.md
• administration/http_interface.md
• administration/management/FE_configuration.md
• faq/Others.md
• administration/management/BE_configuration.md
• faq/Sql_faq.md