As the database got bigger we faced this problem:
the number or matching unique timeseries exceeds 300000; either narrow down the search or increase -search.maxUniqueTimeseries
The Docs show a solution:
On large databases you may experience problems with limit on unique timeseries (default value is 300000). In this case you need to adjust -search.maxUniqueTimeseries parameter:
count unique timeseries in database
wget -O- -q 'http://your_victoriametrics_instance:8428/api/v1/series/count' | jq '.data[0]'
relaunch victoriametrics with search.maxUniqueTimeseries more than value from previous command
The docker-compose file looks now something like this:
victoria-metrics:
image:
dns_search:
environment:
command:
- '--search.maxUniqueTimeseries=1000000'
this still doesn't solve the problem.
How can I pass the flag in docker compose correctly?
UPDATE
The image I was using didn't take flags from docker-compose.yml to consideration. This was the problem.
Do you mean the flag isn't set? Can you check the following metric
flag{name="search.maxUniqueTimeseries"
on VicotriaMetrics /metrics page? Or via the following command: