Error: 502 Bad Gateway - an invalid response from an upstream server

Grafana datasource timeout increase
or
check grafana.log file