Skip to content

Persistent ‘search-max-unique-timeseries’ via TiUP #2682

@huoyao1125

Description

@huoyao1125

Background:
https://tidb.atlassian.net/browse/FRM-3490?focusedCommentId=20519295

Context-

TopSQL Error:
[2026/01/10 09:19:55.336 +08:00] [WARN] [default_query.go:355] ["failed to fetch timeseries db"] [error="{"status":"error","errorType":"422","error":"search error after reading 0 data blocks: error when searching for tagFilters=[{name=\"cpu_time\",instance=\"10.107.41.5:10080\",instance_type=\"tidb\"}] on the time range [2026-01-09T15:59:55Z..2026-01-09T16:16:00Z]: error when searching for metricIDs in the current indexdb: the number of matching timeseries exceeds 300000; either narrow down the search or increase -search.max* command-line flag values (the most likely limit is -search.maxUniqueTimeseries); see https://docs.victoriametrics.com/#resource-usage-limits"}"]

This can be mitigated by manually adjusting the parameter:

[tsdb]
search-max-unique-timeseries = 6000000

However, these changes are currently not persistent and are overwritten on restart or upgrade. As a result, it forces users to repeatedly reapply the same modification.

Feature Request

Please allow search-max-unique-timeseries to be configured via cluster configuration, so that:
Users can adjust this limit according to their cluster size and workload characteristics
The configuration is persisted and automatically applied across restarts and upgrades

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions