# Grafana graphs show 504 / 502 while calling prometheus data source

**URL:** <https://community.grafana.com/t/grafana-graphs-show-504-502-while-calling-prometheus-data-source/1581>\
**Category:** General\
**Created:** [June 28, 2017, 8:58pm UTC](https://community.grafana.com/t/grafana-graphs-show-504-502-while-calling-prometheus-data-source/1581 "2017-06-28T20:58:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhr03](https://avatars.discourse-cdn.com/v4/letter/m/c89c15/32.png) [@mhr03](https://community.grafana.com/u/mhr03)\
**Post date:** [June 28, 2017, 8:58pm UTC](https://community.grafana.com/t/grafana-graphs-show-504-502-while-calling-prometheus-data-source/1581/1 "2017-06-28T20:58:43Z")

</div>

HI

Grafana gets 504/502 while using prometheus data source while running the same query using curl gives back an answer i. following works :

curl -v -L -u : ‘http://\<prom\_server\>/api/v1/query\_range?query=avg(rate(http\_get\_title\_timer\_sum%7Bstack%3D%22search-service–2001-3-442–76GrqRw%22%7D%5B2m%5D)%20%2F%20rate(http\_get\_title\_timer\_count%7Bstack%3D%22search-service–2001-3-442–76GrqRw%22%7D%5B2m%5D))\*1000&start=1498679590&end=1498681390&step=1’

Any ideas on how to debug if there is a grafana issue?

---

<div class="post-metadata">

**Author:** ![daniellee](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/daniellee/32/41_2.png) [@daniellee](https://community.grafana.com/u/daniellee)\
**Post date:** [June 29, 2017, 11:47am UTC](https://community.grafana.com/t/grafana-graphs-show-504-502-while-calling-prometheus-data-source/1581/2 "2017-06-29T11:47:54Z")

</div>

Any errors in the console in your browser or in the Grafana server logs?

---

<div class="post-metadata">

**Author:** ![anon80964540](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anon80964540](https://community.grafana.com/u/anon80964540)\
**Post date:** [January 13, 2021, 4:39pm UTC](https://community.grafana.com/t/grafana-graphs-show-504-502-while-calling-prometheus-data-source/1581/3 "2021-01-13T16:39:52Z")

</div>


