Interview Prep/Monitoring & Observability/Grafana dashboards and data sources

Grafana shows `504 Gateway Timeout` on long-range queries

AdvancedTroubleshootingGrafana dashboards and data sources
Answer

Likely causes → The query outlasts the data source timeout, the Grafana [dataproxy] timeout (default 30s), or an ingress/load balancer idle timeout.

Diagnose → Query inspector shows request duration; check ingress annotations and Grafana logs.

Fix → Optimise the query (recording rules), raise the data source Timeout field and [dataproxy] timeout, and the ingress proxy-read-timeout.

Prevent → Keep heavy long-range views on downsampled data (Thanos/Mimir).

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Grafana dashboards and data sources