getsentry / getsentry/sentry

Dashboard widgets spin indefinitely on query timeout with no error state

Open
#109,928 3 comments 0 reactions 0 assignees View on GitHub
Improvement Product Area: Dashboards
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
21h 10m
Merged PRs (30d)
635

Description

### Environment

SaaS (https://sentry.io/)

### Steps to Reproduce

1. Create a dashboard with widgets using count_unique(user) or count_unique(issue) aggregations with filter predicates (e.g., device/OS filters)
2. Select one or more high-volume projects
3. Set the time range to 14d (or any range where the query exceeds ~30s of backend processing)
4. Observe widgets that cannot complete their query in time

### Expected Result

Widgets that fail due to a query timeout should display an error state with actionable guidance (e.g., "Query timed out — try a narrower time range or simpler filters").

### Actual Result

Widgets spin indefinitely with no error message, no timeout feedback, and no indication of what went wrong. The underlying cause is a 504 stream timeout returned by the GCP load balancer when the upstream doesn't respond within ~30 seconds, but the frontend never surfaces this to the user.

Additionally, from what I see, because the 504 is generated by the GCP LB (not the application), the response has no Sentry headers and a plain-text body of stream timeout. The application itself never gets a chance to return a structured error.

### Product Area

Dashboards

### Link

_No response_

### DSN

_No response_

### Version

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by tracing the dashboard widget query and frontend error-handling path, then reproduce the issue with count_unique aggregations, filter predicates, a high-volume project, and a 14-day range. Confirm how the frontend handles the GCP load balancer's plain-text 504 stream timeout; done means timed-out widgets stop spinning and show actionable guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
gcp
Domain
cloud, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.