Promtail's log return code 429, and the description is "Maximum active stream limit exceeded....."

hello, i’m collecting our group’s log using Loki+promtail recently, we have about 10000 log files that each one has about 20M ,

when i start promtail to collect log files, about 30 seconds after, the 429 code occurs.

and my promtail configuration is
image

my loki’s configuration is

so , which param i have to adjust to let promtail work ok.

Maximum active stream limit exceeded, reduce the number of active streams (reduce labels or reduce label values), or contact your Loki administrator to see if the limit can be increased"

That’s a Loki ingester error.

When sending logs to Loki, each unique set of labels is considered one log stream. With 10000 files, you have minimum 10000 log streams (because each of them would at minimum has an unique filename label), potentially more if you are parsing for labels.

Try adjusting max_global_streams_per_user under limits_config. Also see Grafana Loki configuration parameters | Grafana Loki documentation

1 Like

there is another param named ```
max_streams_per_user