Unable to load datasource metadata

Hi,

i am using auto refresh for my dashboard which display several metric value in singlestat panel and sometimes during auto refresh, some panel are showing N/A with error “unable to load datasource metadata”

I am installing grafana and influxDB in docker and using NGINX reverse proxy.

logs and screenshot as below.

any idea what could be the problem.

t=2018-07-05T05:52:32+0000 lvl=eror msg="Failed to get user with id" logger=context userId=6 error="User not found"
t=2018-07-05T05:52:32+0000 lvl=eror msg="Unable to load datasource meta data" logger=context userId=6 orgId=1 uname=fopscore error="Data source not found"
t=2018-07-05T05:52:32+0000 lvl=info msg="Request Completed" logger=context userId=0 orgId=0 uname= method=GET path=/api/datasources/proxy/3/query status=401 remote_addr=172.19.0.1 time_ms=16 size=26 referer="https://10.64.146.96/grafana/d/yAFWGA7mk/home-ps-core?refresh=5m&orgId=1"
t=2018-07-05T05:52:32+0000 lvl=eror msg="Request Completed" logger=context userId=6 orgId=1 uname=fopscore method=GET path=/api/datasources/proxy/3/query status=500 remote_addr=172.19.0.1 time_ms=18 size=49 referer="https://10.64.146.96/grafana/d/yAFWGA7mk/home-ps-core?refresh=5m&orgId=1"
t=2018-07-05T05:52:32+0000 lvl=info msg="Database table locked, sleeping then retrying" logger=sqlstore retry=0
t=2018-07-05T05:52:32+0000 lvl=eror msg="Failed to get user with id" logger=context userId=6 error="User not found"
t=2018-07-05T05:52:32+0000 lvl=info msg="Request Completed" logger=context userId=0 orgId=0 uname= method=GET path=/api/datasources/proxy/16/query status=401 remote_addr=172.19.0.1 time_ms=23 size=26 referer="https://10.64.146.96/grafana/d/yAFWGA7mk/home-ps-core?refresh=5m&orgId=1"
t=2018-07-05T05:52:32+0000 lvl=info msg="Database table locked, sleeping then retrying" logger=sqlstore retry=0
t=2018-07-05T05:52:32+0000 lvl=info msg="Database table locked, sleeping then retrying" logger=sqlstore retry=0
t=2018-07-05T05:52:32+0000 lvl=info msg="Request Completed" logger=context userId=6 orgId=1 uname=fopscore method=GET path=/api/login/ping status=401 remote_addr=172.19.0.1 time_ms=2 size=26 referer="https://10.64.146.96/grafana/d/yAFWGA7mk/home-ps-core?refresh=5m&orgId=1"
t=2018-07-05T05:52:32+0000 lvl=info msg="Request Completed" logger=context userId=6 orgId=1 uname=fopscore method=GET path=/api/login/ping status=401 remote_addr=172.19.0.1 time_ms=21 size=26 referer="https://10.64.146.96/grafana/d/yAFWGA7mk/home-ps-core?refresh=5m&orgId=1"
t=2018-07-05T05:52:32+0000 lvl=info msg="Database table locked, sleeping then retrying" logger=sqlstore retry=1
t=2018-07-05T05:52:32+0000 lvl=info msg="Database table locked, sleeping then retrying" logger=sqlstore retry=2

Thanks,
Heri

Hi all,

Anyone has experience on this problem ?

If you are using sqlite as your backend it can’t handle multiple queries at once and locks and rejects the request
“Database table locked”

You need to move to mysql or postrgres and it will fix this issue as they allow multiple requests at the same time