New issue caused by tweaking limits_config max_query_length

Hi -

We experienced an error on one of our dashboards that read: the query time range exceeds the limit (query length: 742h59m0s, limit: 30d1h).

We researched this and discovered that we needed to change the limits_config max_query_length in order to solve this problem within the Loki.yaml. We updated the Loki. yaml config file to max_query_length: 365d1h. This solved the query time range exceeds the limit (query length: 742h59m0s, limit: 30d1h) errror, but introduced a new error.

The new error reads: Status 504. Message: Get "https://loki-read:3100/loki/api/v1/query_range? query details
timeout awaiting response headers (Client.Timeout exceeded while awaiting headers).

Any insights as to what is causing this error?

Thanks,
Jake

That usually means your loki cluster is running out of resources. Looks like you are running a single instance, there is not much you can do besides giving it more memory and extending query timeout further.

If you want to query a log of logs I’d recommend considering clustering and so you can do query splitting.