farshad
03/18/2026, 3:03 AMRocky
03/18/2026, 3:03 AMstorage_root_path and load the metadata (headers) for every tablet assigned to that node into memory. If you have a large number of tablets or rowsets, this process is extremely CPU-intensive as it parses thousands of files.
2. Memory Statistics:
* jemalloc_active(64833564672) (~60.4 GB) vs metadata(157301299) (~150 MB).
* The high jemalloc_active compared to low StarRocks-tracked metadata suggests that the memory is allocated but hasn't been fully "handed over" to the internal StarRocks trackers yet, or it's consumed by the large volume of tablet header objects being initialized.
* Since your limit is 150 GB and you are at ~65 GB, this is not a memory OOM (Out of Memory) crash.
3. The Termination Signal:
* daemon.cpp:295 got signal: Terminated from pid: 525(bash)
* This indicates an external process (likely the Kubernetes Kubelet or the starrocks-manager bash script) sent a SIGTERM to the BE.
* In Kubernetes, this usually happens because the Liveness Probe failed. If the BE takes too long to load metadata, its ports (8040, 9050) are not yet open, causing the probes to fail and K8s to restart the Pod.
Recommended Troubleshooting & Solutions
1. Adjust Kubernetes Probes (Primary Solution)
The BE is likely healthy but just slow to start due to the volume of data. You need to give it more time to complete the metadata loading before Kubernetes kills it.
* Increase `initialDelaySeconds`: Set this to a much higher value (e.g., 300 or 600 seconds).
* Increase `failureThreshold`: Allow more failed attempts before a restart.
* Use a Startup Probe: If your K8s version supports it, define a startupProbe with a long timeout to handle this initial loading phase, separate from the livenessProbe.
2. Verify Metadata Loading in Logs
Check the <http://be.INFO|be.INFO> log files (usually in storage/log/be.INFO). Look for lines similar to:
text
Ixxxx xx:xx:xx.xxxxxx xxxxx tablet_manager.cpp:xxx] loading tablet metadata...
Ixxxx xx:xx:xx.xxxxxx xxxxx tablet_manager.cpp:xxx] finished loading tablet metadata.
If you see a long gap between these logs, it confirms the BE is simply busy loading tablets.
3. Check Tablet/Rowset Count
A common cause for slow startup is having too many small tablets or versions (rowsets).
* Run show backends\G from the FE to see the TabletNum for that BE (if it was ever up).
* If the number of tablets is in the hundreds of thousands or millions, consider increasing the partition granularity or merging small tables.
4. PreStop Hook Failure
The "failed prestophook" occurs because Kubernetes tries to run a script (like be_prestop.sh) before killing the pod. These scripts often try to connect to the BE's HTTP port to "decommission" or "checkpoint" it. Since the BE hasn't finished starting, the port is refused, causing the hook to fail. You can safely ignore this once you fix the startup timeout.
5. Configuration Optimization
If you have a high-core machine (18 cores), you can try to increase the parallelism of metadata loading (though this is often I/O bound).
* Check if your disk I/O is saturated during this 100% CPU period (iostat -x 1).
* If you have many disks, ensure storage_root_path is configured to use all of them to parallelize the load.
Summary: Your BE is not crashing; it is being killed for taking too long to start. Increase your Kubernetes Liveness/Startup probe timeouts significantly (e.g., to 10-15 minutes) to allow the 64GB of metadata to finish loading.
ReferencesRocky
03/18/2026, 3:03 AM