getredash/redash · error · Exception

Request exceeded timeout.

Error message

Request exceeded timeout.

What it means

Companion guard in the same CloudWatch Insights polling loop: if elapsed polling time exceeds the module's TIMEOUT while the query is still neither Complete nor in a terminal failed state, Redash gives up — the query may still finish on AWS's side later.

Source

Thrown at redash/query_runner/cloudwatch_insights.py:144

        return log_groups

    def run_query(self, query, user):
        logs = self._get_client()

        query = parse_query(query)
        query_id = logs.start_query(**query)["queryId"]

        elapsed = 0
        while True:
            result = logs.get_query_results(queryId=query_id)
            if result["status"] == "Complete":
                data = parse_response(result)
                break
            if result["status"] in ("Failed", "Timeout", "Unknown", "Cancelled"):
                raise Exception("CloudWatch Insights Query Execution Status: {}".format(result["status"]))
            elif elapsed > TIMEOUT:
                raise Exception("Request exceeded timeout.")
            else:
                time.sleep(POLL_INTERVAL)
                elapsed += POLL_INTERVAL

        return data, None


register(CloudWatchInsights)

View on GitHub (pinned to ca79fe988d)

Solutions

  1. Narrow the query time range and add filter clauses to reduce scanned data
  2. Split the query by log group or time window
  3. Retry when CloudWatch Logs is degraded (check the AWS health dashboard)
  4. If consistently slow, raise TIMEOUT/POLL_INTERVAL in your own fork

Example fix

# before
fields @timestamp | filter @message like /Exception/

# after
fields @timestamp | filter @message like /Exception/ | filter @timestamp > now() - 3600s
Defensive patterns

Strategy: retry

Validate before calling

# bound the work: require a time filter in every scheduled query
assert '@timestamp >' in query or 'filter @timestamp' in query

Try / catch

for attempt in range(2):
    try:
        data, err = runner.run_query(q, u); break
    except Exception as e:
        if 'exceeded timeout' in str(e) and attempt == 0:
            q = add_narrower_time_filter(q); continue
        raise

Prevention

When it happens

Trigger: An Insights query that keeps returning a running/scheduled status longer than the runner's hard-coded TIMEOUT while Redash polls every POLL_INTERVAL seconds.

Common situations: Very broad time ranges or unfiltered scans over huge log groups, AWS throttling slowing progress, or transient AWS slowness.

Understand the failure class

Related errors


AI-assisted analysis of getredash/redash@ca79fe988d (2026-08-28). Data as JSON: /api/errors/c1d0ef6cb9ac000a. Report an issue: GitHub.