kushagra.dubey
08/20/2026, 4:15 PMRocky
08/20/2026, 4:15 PM127.0.0.1:6090):
* The DEADLINE_EXCEEDED after 29.999s error when calling createShardGroup means the FE's internal metadata service (StarMgr) is either overloaded or deadlocked.
* Since it's calling 127.0.0.1, it is trying to talk to the local StarMgr process running inside the FE. If this times out, the FE cannot complete table/partition creations.
2. FE Resource Saturation:
* The receive slow http request ... latency: 52295 ms and Broken pipe (Thrift errors) strongly suggest the FE is experiencing extreme GC pauses (JVM) or CPU exhaustion.
* When the FE hangs, it stops responding to RPCs on port 9020 (hence the Connection refused on other nodes) and HTTP requests for transaction commits.
3. Transaction Mismatch:
* Can not abort COMMITTED transaction occurs because the client (loading tool) timed out waiting for the FE and sent an "abort" request. However, the FE eventually finished the "commit" in the background after the lag, leading to a state conflict.
Recommended Troubleshooting Steps
1. Check FE JVM and Resource Health
The most common cause is a "Stop the World" GC pause or CPU saturation on the FE.
* Logs: Check fe.gc.log for long pauses (>1s).
* Metrics: Check FE CPU and Memory usage. If memory is near the limit, increase -Xmx in fe.conf.
* Thread Dump: If the FE is up but unresponsive, take a thread dump (jstack <pid>) to check for lock contention or deadlocks in com.starrocks.lake.StarOSAgent.
2. Tune StarMgr (Shared-Data specific)
If you have a high volume of partition creations or DDLs, the StarMgr gRPC server might be hitting its thread limit. Add or increase these in `fe.conf`:
conf
# Increase gRPC worker threads for metadata management
starmgr_grpc_server_max_worker_threads = 2048
# If timeouts persist, you can try increasing the internal timeout (Default is often lower)
# starmgr_grpc_timeout_seconds = 60
3. Verify Connectivity to Port 6090
Ensure the FE is actually listening on port 6090 (controlled by cloud_native_meta_port in fe.conf).
* Run netstat -nlpt | grep 6090 on the FE node.
* Check if any firewall or security group is blocking local gRPC communication.
4. Optimize Object Storage Access
In Shared-data mode, shard creation involves metadata writes to your object storage (S3/GCS/OSS).
* Check if your object storage provider is experiencing high latency.
* If you are creating thousands of partitions at once, reduce the batch size. High bucket counts in partitioned tables can overwhelm the metadata service.
5. Check Cluster Connectivity
The error socket connection to starrocks-fe-1...:9020 failed suggests that FE-1 might have crashed or its RPC service is down. Use SHOW FRONTENDS; to check the status of all FE nodes and ensure they are all Alive.
Summary of Logs to Inspect
* fe.log: Look for "StarOS" or "Starlet" related errors just before the timeouts.
* fe.warn.log: Check for repeated "slow http request" or "lock" warnings.
* <http://be.INFO|be.INFO> (on CN nodes): Check if Compute Nodes are also reporting errors connecting to the FE.
References
• administration/management/FE_configuration.mdkushagra.dubey
08/20/2026, 4:19 PMRocky
08/20/2026, 4:19 PMLEADER, and the FOLLOWERS are failing because they cannot find a leader to synchronize metadata with.
1. Identify the Crash Reason
Before fixing the metadata, check why the pods are physically going down. Run:
bash
kubectl describe pod <fe-pod-name>
kubectl get pod <fe-pod-name> -o yaml
* OOMKilled: If the lastState is Terminated with reason OOMKilled, your FE needs more memory. Replaying large edit logs during startup is memory-intensive. Increase the FE RAM limit and -Xmx in fe.conf.
* Liveness Probe Failure: If K8s is killing the pods because the probes fail, it’s because the FE is busy replaying logs and isn't "Ready" yet. Increase the initialDelaySeconds and failureThreshold of your liveness/readiness probes to give the FE 5-10 minutes to start.
2. Why "Meta out of date"?
The meta out of date and Connection refused (port 9020) errors happen because:
1. The FE starts as a FOLLOWER.
2. It attempts to connect to the last known LEADER to sync logs.
3. The leader is either down or unreachable, so the follower stays in a "non-ready" state.
4. Since it's not ready, it fails its Kubernetes health check and is restarted, creating a Crash Loop.
3. Recovery Procedure (Quorum Recovery)
If all FE pods are stuck and no Leader emerges, you likely have a BDBJE (metadata database) quorum issue.
Step A: Stop all FE pods
Scale the FE deployment/statefulset to 0. This ensures no locked metadata files exist.
bash
kubectl scale statefulset <fe-statefulset-name> --replicas=0
Step B: Identify the node with the latest metadata
Check the PVs (Persistent Volumes) of your FEs. Look into the meta/image directory. The node with the largest image.<number> or the highest sequence in meta/bdb is your best candidate for the new leader (usually the one that was up longest).
Step C: Force Start a Leader (Recovery Mode)
Pick one FE pod (e.g., fe-0) and force it to start as the Master to reset the quorum.
1. Edit the FE configuration (via ConfigMap or by manually editing the launch script in a temporary pod) to add:
conf
metadata_failure_recovery = true
2. Scale the replicas to 1 (starting only fe-0).
3. Crucial: Watch the logs of fe-0. Once you see Master/Leader started, immediately remove the metadata_failure_recovery = true flag from the config and restart that pod normally.
4. Once fe-0 is healthy and stable as Leader, scale the other replicas back up. They will then join as Followers and sync from fe-0.
4. Check Network Connectivity
The logs show starrocks-fe-0...:9020 failed. Ensure that:
* The Headless Service for FEs is working correctly.
* Port 9010 (Edit log port) is open and reachable between all FE pods. If FEs cannot talk on 9010, they can never elect a leader.
Summary Recommendation:
1. Increase FE Memory and Probe timeouts first (this fixes 80% of K8s FE loops).
2. If it still won't elect a leader, perform the Quorum Recovery (Step 3).kushagra.dubey
08/20/2026, 4:51 PMRocky
08/20/2026, 4:53 PMLakeTableTxnLogApplier process in StarRocks Shared-data (Cloud-native) mode; it's simply catching up on transaction logs for your lake tables.
The reason your FE stays in UNKNOWN status and eventually goes down is likely a Kubernetes Probe Timeout. Kubernetes sees that the FE isn't "Ready" or "Live" yet and kills it, which resets the replay process and creates an infinite loop.
Immediate Fix: Increase Kubernetes Probes
You must give the FE enough time to finish replaying its logs. Replaying millions of edit logs can take 5–20 minutes depending on your disk speed and metadata volume.
Modify your FE Deployment/StatefulSet YAML:
yaml
livenessProbe:
initialDelaySeconds: 300 # Increase to 5-10 minutes
periodSeconds: 30
failureThreshold: 20 # Allow many failures during startup
readinessProbe:
initialDelaySeconds: 300 # Increase to 5-10 minutes
periodSeconds: 30
failureThreshold: 20
Troubleshooting the "Stable State" Wait
If the FE still doesn't become a LEADER/FOLLOWER after 20 minutes, check these specific causes mentioned in your logs:
1. Check for Quorum (Reason 2):
If you have 3 FEs, at least 2 must be started and able to communicate to elect a Leader. If only fe-0 is up, it will wait forever. Ensure all FE pods are attempting to start.
2. Clock Synchronization (Reason 4):
StarRocks is very sensitive to time. Run date on all FE pods. If the difference is 5 seconds, the BDBJE (metadata store) will refuse to elect a leader. Ensure your K8s nodes are running
ntpd or chronyd.
3. Disk I/O Pressure:
The LakeTableTxnLogApplier and BDBJE replay are heavy on disk I/O. If your metadata is on a slow network disk (like standard HDD or throttled cloud storage), replay will be very slow. Check the IOPS/latency on the FE metadata volume.
4. FE Metadata Cleanup:
If your metadata has grown too large (too many edit logs without a checkpoint), the replay takes too long. Once you get one FE to successfully start as a Leader, it will eventually perform a Checkpoint, which creates a new image file and deletes old edit logs, making future restarts much faster.
How to verify progress
While the pod is starting, exec into the container and watch the metadata directory:
bash
# Watch the size of the bdb directory
du -sh /opt/starrocks/fe/meta/bdb/
# Watch the latest log file being updated
ls -lrt /opt/starrocks/fe/meta/bdb/ | tail -n 5
If the file sizes or names are changing, the FE is making progress. Do not restart it manually; let it finish.
Summary
Your FE is not crashing; it is being killed by Kubernetes while it is working. Increase your initialDelaySeconds and failureThreshold in your K8s spec to allow the metadata replay to complete.
References
• knowledge/trouble_shooting/fe_deadlock_problems.md
• administration/management/FE_configuration.md
• data_source/catalog/iceberg/iceberg_meta_table.md
• administration/management/BE_configuration.md
• data_source/catalog/iceberg/DDL.mdkushagra.dubey
08/20/2026, 5:03 PMRocky
08/20/2026, 5:04 PMGlobalStateMgr.
* The Waiters: Your log shows thrift-server-pool and autovacuum-pool threads waiting for INTENTION_EXCLUSIVE locks.
* The Culprit: There is likely a single "holder" thread that has been holding a SHARED or EXCLUSIVE lock for a long time, blocking the entire queue.
Common causes in Shared-data (Lake) clusters:
1. Massive Metadata Replay: If the FE was down and is now replaying a huge volume of "Transaction Logs" from the object store (as seen in your LakeTableTxnLogApplier logs), it holds locks while processing these updates.
2. Overloaded Autovacuum: The autovacuum-pool is responsible for cleaning up old data in the object store. If it's trying to clean thousands of partitions simultaneously, it can cause lock contention.
3. Heavy DDL/Schema Change: A long-running ALTER TABLE or a bulk ADD PARTITION operation.
Recommended Actions
1. Disable/Throttle Autovacuum & Compaction Temporarily
Since your logs show autovacuum-pool threads involved in the lock queue, try reducing the pressure on the FE metadata by adding these to your fe.conf and restarting:
conf
# Reduce parallel autovacuum tasks
lake_autovacuum_parallel_partitions = 2
# Increase the interval between autovacuum runs
lake_autovacuum_partition_naptime_seconds = 600
# Temporarily disable compaction if needed to stabilize
lake_compaction_max_tasks = 0
2. Increase Kubernetes Probe Thresholds (Required)
The FE will eventually recover once it finishes replaying the logs or the blocking task completes, but Kubernetes is killing it too soon.
* Set your livenessProbe and readinessProbe to have a failureThreshold of at least 30 and an initialDelaySeconds of 600 (10 minutes). This prevents K8s from restarting the FE while it's in the middle of a long metadata operation.
3. Identify the "Lock Holder"
To find exactly which thread is holding the lock, you need a full thread dump while the FE is "stuck" but before it restarts.
1. Exec into the FE pod.
2. Run: jstack -l <pid> > thread_dump.txt
3. Look for the thread that "locked" a ReentrantReadWriteLock.
* Search for: - locked <0x...>
* Search for: GlobalStateMgr or Database.readLock/writeLock in the stack trace.
4. Check FE JVM Memory
Lock stalls can also be triggered by "Full GC" pauses. If the FE is replaying many logs, it consumes a lot of heap.
* Check fe.gc.log. If you see "Full GC" occurring frequently right before the 41s lock wait, you must increase the memory (e.g., set -Xmx to 16G or 32G if your metadata is large).
Summary of Configuration changes to stabilize:
If you can edit the FE configuration (via ConfigMap), try these:
1. lake_autovacuum_parallel_partitions = 4 (Down from 8)
2. lake_compaction_max_tasks = 16 (Down from default adaptive)
3. Ensure Xmx is at least 8GB-16GB for stable metadata replay.
4. Increase K8s probe timeouts so the pod isn't killed during the 40s+ lock wait.
References
• administration/management/FE_configuration.md
• administration/management/compaction.md
• knowledge/usage/best-practice.md