502: Bad Gateway

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

$ uname -r
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.6 (Maipo)
$ rpm -qa grafana
$ rpm -qa influxdb
$ rpm -qa nginx

  • 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.