Loki: Maximum active stream limit exceeded, reduce the number of active streams
Every unique set of labels is its own stream in Loki, and the tenant has gone over its stream limit. That nearly always means a high cardinality value got into the labels, such as a request ID, user ID, pod hash or full path. Raising the limit only postpones the problem. Move the value out of the labels and into the log line or structured metadata.
Quick fix
Read the commands before running them. Anything that restarts a service, deletes data or changes permissions should be tried on a non-production system first.
# Which label has exploded? (logcli)
logcli series '{job="app"}' --analyze-labels
# Promtail/Alloy: stop promoting the value to a label
# pipeline_stages:
# - labeldrop: [request_id, user_id]
# Query it from the line instead
{job="app"} | json | request_id="abc123"
# Only if streams are legitimately numerous (limits_config)
limits_config:
max_global_streams_per_user: 10000
How to diagnose Logging errors
Logging failures are dangerous because they are silent: the application keeps running while its telemetry disappears. The recurring causes are buffer overflow under backpressure (the destination cannot keep up), permissions on log files or directories, and ingestion rate limits at the cloud provider. Monitoring the logging pipeline itself is the only reliable way to notice.
If the quick fix above does not resolve it, work through these steps. They apply to this whole class of error, not just to this one message, which is usually what saves the time.
- Check the collector's own logs first: Fluentd, Logstash and the CloudWatch agent all log their own failures, usually to a separate destination.
- Look for backpressure metrics: buffer queue length, retry counts, and dropped-record counters. A full buffer means the destination, not the collector, is the bottleneck.
- Verify write permissions and disk space on the buffer path. A full disk silently stops most collectors.
- For cloud ingestion, check the API rate limit for the log group or stream and batch more aggressively rather than retrying harder.
- Add a heartbeat log line and alert on its absence. This is the only way to detect a pipeline that has stopped without erroring.
Tools worth reaching for
collector self-logsbuffer/queue metricsdf -haws logs describe-log-streamslogger / fluent-cat for test events
Authoritative references
Primary documentation for this error, worth reading before applying any fix in production.
Related Logging errors
- CloudWatch Logs: Rate exceeded (ThrottlingException)PutLogEvents API calls are being throttled by CloudWatch Logs. The account or log group is…
- Elasticsearch: Limit of total fields [1000] has been exceededDynamic mapping adds a new field for every new key it sees, and JSON logs whose keys contain…
- Error response from daemon: configured logging driver does not support readingThe container sends its logs to a driver such as syslog, gelf, fluentd or awslogs, so they…
- Fluent Bit: Action/metadata line [1] contains an unknown parameter [_type]Elasticsearch 8 removed mapping types, and rejects any bulk request that still sends _type…
- Fluentd: Buffer overflowFluentd's output buffer is full because the destination cannot accept data fast enough. Logs…
- journalctl: No journal files were foundjournald stores logs in memory when /var/log/journal does not exist, so everything is…
- Log4j: Appender not foundThe logging configuration references an appender that is not defined. The log4j2.xml or…
- log4j2: ERROR StatusLogger No Log4j 2 configuration file foundLog4j 2 could not find log4j2.xml on the classpath and fell back to logging errors only to…
Browse other categories
- HTTP 494xx client errors, 5xx server errors, redirects, headers and protocol problems.
- JavaScript 42npm resolution, async pitfalls, hydration, memory limits and runtime type…
- Database 41Connections, deadlocks, constraints, replication and memory limits.
- AI 35Rate limits, context windows, GPU memory and model-serving failures.
- Network 35Refused connections, timeouts, resets, MTU problems and port exhaustion.
- Python 35Imports, virtual environments, encoding, concurrency and dependency conflicts.
- Kubernetes 34CrashLoopBackOff, ImagePullBackOff, OOMKilled, RBAC, scheduling and storage.
- Docker 27Daemon connectivity, disk space, image pulls, ports and architecture mismatches.
- System 26Disk space, systemd units, file descriptors, OOM killer and scheduled jobs.
- Cloud 25IAM permissions, quotas, service limits and credential failures.
- Security 25JWT validation, CSRF, OAuth grants, SELinux, SSH host keys and CSP.
- TLS 24Untrusted authorities, expiry, hostname mismatch, chains and cipher negotiation.
Something missing or wrong?
This entry is maintained by hand. If the fix is out of date, incomplete, or you have a better one, email a correction and it will be reviewed.