Loki compactor logs `failed to upload ... AccessDenied` and retention stops working
IntermediateTroubleshootingLogging: Loki, Fluent Bit and Elasticsearch
Answer
Likely causes → The IAM role (IRSA) lacks s3:DeleteObject/s3:PutObject, or retention isn't enabled on the compactor.
Diagnose → Compactor logs; aws s3 ls s3://loki-chunks/index/ to see if index files update.
Fix → Grant s3:ListBucket, s3:GetObject, s3:PutObject, s3:DeleteObject; set compactor.retention_enabled: true with delete_request_store: s3 and limits_config.retention_period: 744h.
Prevent → Alert on loki_compactor_last_successful_run_timestamp_seconds staleness.
More on Logging: Loki, Fluent Bit and Elasticsearch
Promtail/Alloy logs `server returned HTTP status 400 Bad Request (400): entry with timestamp ... ignored, reason: 'entry out of order' for stream`IntermediateAgents 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 GrafanaAdvanced