Grafana error after unresponsive script

Grafana was running good until I made a query which took like 20 seconds to run, browser gave me error of unresponsive script. After that, grafana page is not appearing. I check logs, they are normal like before, but i cant see grafana.
This is what I get,

Here are the logs,

t=2017-04-28T11:31:17+0530 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/grafana/public/app/boot.5ee7468a.js status=404 remote_addr=127.0.0.1 time_ms=11ns size=12849
t=2017-04-28T11:31:17+0530 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/grafana/public/css/fonts.min.css status=404 remote_addr=127.0.0.1 time_ms=9ns size=12849
t=2017-04-28T11:31:17+0530 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/grafana/public/css/grafana.dark.min.fc104690.css status=404 remote_addr=127.0.0.1 time_ms=21ns size=12849
t=2017-04-28T11:31:18+0530 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/grafana/public/app/boot.5ee7468a.js status=404 remote_addr=127.0.0.1 time_ms=12ns size=12849

Did it hang on a dashboard with template variables? If you open a new tab and go to a different dashboard does everything work as normal?

It happened as I had changed the grafana.ini file as I wanted to host it through nginx,

[server]
domain = 'cloudapp.net
root_url = ‘%(protocol)s://%(domain)s:/grafana’

After I changed these to default, Grafana was working again noormal.

1 Like

So the problem of Grafana only showing white page is not related to the slow query it’s related to your nginx config. If you add subpath to grafana in the root_url option you need to access grafana via this url (via nginx).

The nginx config needs to be correct (there are subtle differences like MISSING trailing slash that can cause the issue you experianced)

location /grafana/ {
   proxy_pass http://localhost:3000/;
}

http://docs.grafana.org/installation/behind_proxy/#nginx-configuration

1 Like