Summary
Fixes a bug where STARROCKS_QUERY_TIMEOUT environment variable was silently
ignored, causing long-running queries to fail with a ~30s timeout regardless
of what was configured.
Root Cause
The MySQL connector distinguishes between two types of timeouts:
| Timeout |
Purpose |
Was Configurable? |
connect_timeout |
Time to establish a connection |
✅ Yes (via STARROCKS_CONNECTION_TIMEOUT) |
read_timeout |
Time to wait for query results |
❌ No — this PR fixes it |
The STARROCKS_QUERY_TIMEOUT env var existed in documentation/configs
but was never wired into the connection pool, so the MySQL connector
fell back to its internal default (~30s), causing timeouts on analytical
queries over large datasets.
Fix
Add read_timeout to the connection pool config, reading from the
STARROCKS_QUERY_TIMEOUT environment variable:
'read_timeout': int(os.getenv('STARROCKS_QUERY_TIMEOUT', '600')),
Summary
Fixes a bug where
STARROCKS_QUERY_TIMEOUTenvironment variable was silentlyignored, causing long-running queries to fail with a ~30s timeout regardless
of what was configured.
Root Cause
The MySQL connector distinguishes between two types of timeouts:
connect_timeoutSTARROCKS_CONNECTION_TIMEOUT)read_timeoutThe
STARROCKS_QUERY_TIMEOUTenv var existed in documentation/configsbut was never wired into the connection pool, so the MySQL connector
fell back to its internal default (~30s), causing timeouts on analytical
queries over large datasets.
Fix
Add
read_timeoutto the connection pool config, reading from theSTARROCKS_QUERY_TIMEOUTenvironment variable: