Skip to content

Unexpected too far behind errors #5936

Description

@moray95

Loki rejects logs with "too far behind" errors when reject_old_samples is disabled and logs are no older than reject_old_samples_max_age.

Configuration:

 limits_config:
  reject_old_samples: false
  reject_old_samples_max_age: 168h

Steps to reproduce the behavior:
I am not sure how to reproduce the issue but have noticed it mostly appears after a downtime either on Loki itself or the backing object storage.

Expected behavior
After setting reject_old_samples to false, the logs should never be rejected with "entry too far behind" errors, and especially not when logs are no older than the configured reject_old_samples_max_age.

Environment:

  • Loki: 2.4.1
  • Deployment tool: Installed using the Helm chart v2.8.4
  • Infrastructure: RKE 1.21.6

Screenshots, Promtail config, or terminal output

level=warn ts=2022-04-15T09:25:11.8678788Z caller=grpc_logging.go:38 duration=498.136µs method=/logproto.Pusher/Push err="rpc error: code = Code(400) desc = entry with timestamp 2022-04-15 03:20:00.80086913 +0000 UTC ignored, reason: 'entry too far behind' for stream: {REDACTED},
entry with timestamp 2022-04-15 03:20:00.883413328 +0000 UTC ignored, reason: 'entry too far behind' for stream: {REDACTED},
entry with timestamp 2022-04-15 03:20:04.550525553 +0000 UTC ignored, reason: 'entry too far behind' for stream: {REDACTED},
entry with timestamp 2022-04-15 03:20:04.936669923 +0000 UTC ignored, reason: 'entry too far behind' for stream: {REDACTED},
entry with timestamp 2022-04-15 03:20:05.402723364 +0000 UTC ignored, reason: 'entry too far behind' for stream: {REDACTED},
entry with timestamp 2022-04-15 03:20:05.977017186 +0000 UTC ignored, reason: 'entry too far behind' for stream: {REDACTED},
entry with timestamp 2022-04-15 03:20:07.235240884 +0000 UTC ignored, reason: 'entry too far behind' for stream: {REDACTED},
entry with timestamp 2022-04-15 03:20:07.90163636 +0000 UTC ignored, reason: 'entry too far behind' for stream: {REDACTED},
entry with timestamp 2022-04-15 03:20:09.9954798 +0000 UTC ignored, reason: 'entry too far behind' for stream: {REDACTED},
entry with timestamp 2022-04-15 03:20:10.159147785 +0000 UTC ignored, reason: 'entry too far behind' for stream: {REDACTED},
total ignored: 926 out of 926" msg="gRPC
"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions