502: Bad Gateway

  • What Grafana version and what operating system are you using?

$ uname -r
3.10.0-957.21.3.el7.x86_64
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.6 (Maipo)
$ rpm -qa grafana
grafana-7.1.0~beta2-1.x86_64
$ rpm -qa influxdb
influxdb-1.8.6-1.x86_64
$ rpm -qa nginx
nginx-1.12.2-2.el7.x86_64

  • What happened?
    When the user selects the ‘All’ filter on our dashboards, most queries fail and we get this error: 502 - Bad Gateway in Grafana. If it refreshes the page, the errors disappear and the dashboards work. We use an nginx as a reverse proxy and imagine that the problem is linked to URI size or headers. We made an attempt to increase the buffers: large_client_header_buffers 32 1024k. A second attempt was to change the InfluxDB method from GET to POST. Errors have diminished, but they still happen constantly. Our configuration uses nginx + Grafana + InfluxDB.

  • What did you expect to happen?
    That the dashboards were consulted normally, without the need to refresh the page.

welcome to the :grafana: forum, @lmagdanello

I think we will need more information before anyone can offer help. Can you share your variable configurations? Something about your template variable is triggering this error. What kind of variable is it? screenshots of those configurations and your panel will help :+1:


Our dashboard is quite big, but I uploaded a screenshot of the variables we use in them as a whole.