Databases 4 min read

StarRocks Production Troubleshooting: Data Loss, Memory Spikes, and Global Dictionary Errors

The author documents three StarRocks production issues: varchar(50) truncating MaxCompute strings, BE memory spikes caused by API gateway timeout mismatches, and a global dictionary error fixed by disabling low-cardinality optimization.

Lakehouse Research Base
Lakehouse Research Base
Lakehouse Research Base
StarRocks Production Troubleshooting: Data Loss, Memory Spikes, and Global Dictionary Errors

Issue 1: Data Loss During MaxCompute to StarRocks Integration

Data was processed in MaxCompute to the ADS layer and then loaded into StarRocks for analysis. The integration task logs showed no errors, but a comparison of distinct column values between MaxCompute and StarRocks revealed that longer string values present in MaxCompute were missing in StarRocks.

Investigation showed the StarRocks table column was defined as varchar(50), while the MaxCompute source column was a string type with an 8 MB length limit. The length mismatch caused silent truncation.

StarRocks table schema showing varchar(50)
StarRocks table schema showing varchar(50)

Solution:

Alter the StarRocks column to a larger length:

ALTER TABLE table_name MODIFY COLUMN column_name varchar(500);

(Note: the original article shows a typo "ALTRER"; the correct keyword is ALTER.)

Re-run the integration task and verify data integrity.

Issue 2: BE Node Memory Spike Due to Timeout Mismatch

The API gateway timeout was set to 30 seconds, while StarRocks query timeout was 300 seconds. When resources were constrained, queries initiated via the gateway could not return within 30 seconds and timed out. The application's retry logic (try-catch) then re-issued the same query, causing multiple concurrent query tasks to run in the cluster and driving up BE memory usage.

Memory spike graph
Memory spike graph

Optimization: Set the query timeout at the SQL level to match the gateway timeout (30 seconds) using a session variable hint:

select /*+ SET_VAR(query_timeout=30) */ ...

Issue 3: Global Dictionary Error "Not Found string in global dict: 2024-11"

A report query failed with the error "Not Found string in global dict: 2024-11". This was caused by the low-cardinality global dictionary optimization incorrectly handling a value.

Error message Not Found string in global dict
Error message Not Found string in global dict

Fix: Disable the low-cardinality global dictionary optimization by setting the session variable:

cbo_enable_low_cardinality_optimize=false
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

StarRocksMaxComputedata integrationquery timeoutproduction troubleshootingglobal dictionarylow cardinality optimizationmemory spikevarchar truncation
Lakehouse Research Base
Written by

Lakehouse Research Base

Focused on technical sharing in the data field, covering a tech stack that includes Hadoop, Spark, Flink, Kafka, Fluss, Paimon, Iceberg, StarRocks, ClickHouse, ES, Milvus, and more. Welcome to follow.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.