Promtail/Alloy logs `server returned HTTP status 400 Bad Request (400): entry with timestamp ... ignored, reason: 'entry out of order' for stream`
IntermediateTroubleshootingLogging: Loki, Fluent Bit and Elasticsearch
Answer
Likely causes → Older Loki (before 2.4) or unordered_writes: false rejects entries older than the latest one in the same stream; two agents ship the same file with the same labels; or a pipeline parses timestamps from the line that go backwards.
Diagnose →
kubectl logs -n logging ds/promtail | grep -c 'out of order'
logcli series '{app="checkout"}' --since=1h
Check whether two pods/agents produce identical label sets.
Fix → Upgrade Loki and enable limits_config.unordered_writes: true (default since 2.4), add a unique label per source (pod, instance), and drop the timestamp stage if app timestamps are unreliable.
Prevent → One writer per stream; monitor loki_discarded_samples_total{reason="out_of_order"}.
More on Logging: Loki, Fluent Bit and Elasticsearch
Agents log `server returned HTTP status 429 Too Many Requests (429): Ingestion rate limit exceeded for user fake (limit: 4194304 bytes/sec)`IntermediateLoki rejects pushes with `Per stream rate limit exceeded (limit: 3MB/sec) while attempting to ingest for stream`AdvancedLoki logs `maximum active stream limit exceeded, reduce the number of active streams`AdvancedLogQL query fails with `max entries limit per query exceeded, limit > max_entries_limit (10000 > 5000)`BeginnerLogQL returns `too many outstanding requests` in GrafanaAdvancedLogs appear in Loki for most pods but not for one namespaceBeginner