Skip to content

max(max_over_time) hangs #23474

Description

@seizethedave

Describe the bug

I've found that max(max_over_time()) metric queries lately aren't working. They time out and I get a generic 502 error. I've tried a few other types of metric queries:

  • sum_over_time still works
  • avg(avg_over_time()) fails just like max_over_time
  • though max_over_time (...) by (something) does work.
  • and max_over_time without being wrapped in max() fails fast with a complaint about high cardinality

To Reproduce
Steps to reproduce the behavior:

  1. Started Loki (SHA or version)
  2. Started Alloy (SHA or version) to tail '...'
  3. Query:
    max(
        max_over_time(
            {namespace="...", container=~"..."} | logfmt | unwrap foo [5m] 
        )
    )
    

Expected behavior
I just expect the metric query to succeed.

Environment:

  • Infrastructure: (Grafana Cloud Logs)

Screenshots, Alloy config, or terminal output
If applicable, add any output to help explain your problem.

this is the error I get:

<html><head> <meta http-equiv="content-type" content="text/html;charset=utf-8"> <title>502 Server Error</title> </head> <body text=#000000 bgcolor=#ffffff> <h1>Error: Server Error</h1> <h2>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.</h2> <h2></h2> </body></html>

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomehing is not working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions