If you're seeing this Grafana has failed to load its application files

Usually once in a while, Grafana throws following message:

If you're seeing this Grafana has failed to load its application files 1. This could be caused by your reverse proxy settings. 2. If you host grafana under subpath make sure your grafana.ini root_url setting includes subpath 3. If you have a local dev build make sure you build frontend using: yarn start, yarn start:hot, or yarn build 4. Sometimes restarting grafana-server can help

When I restart grafana servers, I was able to access grafana but later after some days the same problem comesback.

I have highly available grafana (6.6.1) running on ec2 instances and aws RDS MySQL as grafana database.

When I look into logs, I see following error:

lvl=eror msg=“Request error” logger=context userId=0 orgId=1 uname= error=“net/http: abort Handler” stack="/usr/local/go/src/net/http/httputil/reverseproxy.go:299 (0xabe298)\n/go/src/github.com/grafana/grafana/pkg/api/pluginproxy/ds_proxy.go:122 (0x1024f31)\n/go/src/github.com/grafana/grafana/pkg/api/dataproxy.go:35 (0x1436d88)\n/usr/local/go/src/reflect/value.go:460 (0x4989d5)\n/usr/local/go/src/reflect/value.go:321 (0x498193)\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:177 (0x975229)\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:137 (0x974bd9)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:121 (0x9761c8)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:112 (0xdb3715)\n/go/src/github.com/grafana/grafana/pkg/middleware/request_tracing.go:25 (0xdb3708)\n/usr/local/go/src/reflect/value.go:460 (0x4989d5)\n/usr/local/go/src/reflect/value.go:321 (0x498193)\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:177 (0x975229)\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:137 (0x974bd9)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:121 (0x9761c8)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:112 (0xdb2f0c)\n/go/src/github.com/grafana/grafana/pkg/middleware/request_metrics.go:17 (0xdb2ef7)\n/usr/local/go/src/reflect/value.go:460 (0x4989d5)\n/usr/local/go/src/reflect/value.go:321 (0x498193)\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:177 (0x975229)\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:137 (0x974bd9)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:121 (0x9761c8)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:112 (0xdb2e1f)\n/go/src/github.com/grafana/grafana/pkg/middleware/recovery.go:147 (0xdb2e0d)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:79 (0x976070)\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:157 (0x974f39)\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:135 (0x974cc8)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:121 (0x9761c8)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:112 (0xdb03db)\n/go/src/github.com/grafana/grafana/pkg/middleware/logger.go:34 (0xdb03c6)\n/usr/local/go/src/reflect/value.go:460 (0x4989d5)\n/usr/local/go/src/reflect/value.go:321 (0x498193)\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:177 (0x975229)\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:137 (0x974bd9)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:121 (0x9761c8)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/router.go:187 (0x987326)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/router.go:303 (0x981bf5)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/macaron.go:220 (0x97b0ba)\n/usr/local/go/src/net/http/server.go:2802 (0x707bc3)\n/usr/local/go/src/net/http/server.go:1890 (0x703564)\n/usr/local/go/src/runtime/asm_amd64.s:1357 (0x467db0)\n"