Failed to look up user based on cookie

Using version 6.0.1, I’m having problems where the Unauthorized message appears. Below is the mes in the grafana.log
Failure to drop the session, requiring login again.

T=2019-03-07T10:41:41-0300 lvl=info msg=“Request Completed” logger=context userId=0 orgId=0 uname= method=POST path=/api/datasources/proxy/3 status=401 remote_addr=192.168.15.12 time_ms=1 size=26 referer=“http://192.168.15.200:3000/d/YdgeDcHmz/disponibilidade?orgId=3
t=2019-03-07T10:41:41-0300 lvl=eror msg=“failed to look up user based on cookie” logger=context error=“database is locked”

There’s an open issue https://github.com/grafana/grafana/issues/15316 where some others have similar problems. Could you please provide more information in that issue, like what database (sqlite, mysql, postgres) you’re using, how you run Grafana (docker, k8s, helm, ubuntu etc) and if you use nfs for storage.

This issue could also be related https://github.com/grafana/grafana/issues/10727

Hi @mefraimsson
I’m Anatoli. I’m very struggling with a problem similar to this error.
I see you’re professional in this area. So I really hope you can help me. If this topic is still available, I’ll provide you the detailed information about my issue.
Could you please let me know if this channel is still available to discuss my problem with you?

Thanks in advance.

Have you checked the issue posted above and my latest comment there? Several users has confirmed Grafana v7.5.5 resolved the main problem.

If you have and not applicable to your problem, sure please provide your details here.

Hi @mefraimsson

Did you check my details?
I’m waiting for your reply.

Anatoli

Hey. Sorry, somehow your last post was flagged and temporary hidden so I didn’t notice it.

I’m pretty sure that you somehow overload the sqlite database that Grafana uses per default. In general think that you either need to re-configure sqlite settings in Grafana or switch to MySQL or Postgres. See Grafana Logs "database is locked" · Issue #16638 · grafana/grafana · GitHub for more information and suggestions for improving things.

Hi @mefraimsson

I’m very glad to hear from you. I really don’t know why my post was hidden.
I was eagerly waiting for your reply!
It seems you didn’t see my details. I didn’t use sqlite databased.
I just found out yesterday that my post was hidden. So I posted a new topic yesterday.
Please check this.
https://community.grafana.com/t/grafana-server-error-failed-to-look-up-user-based-on-cookie/52895
I used MySQL. You will be able to check it in my docke4r-compose.yml file

When I use 128GB USB flash drive instead of 32GB SD card, 7days feature works. However,
30 days doesn’t work for me. Really this is an essential option in my application.
I really hope you suggest a good solution for that as soon as possible.

Thanks in advance.
Anatoli

Grafana uses sqlite per default as its underlying storage for storing dashboard and configuration data in general. That’s probably where you’re having issues and the issues I’ve earlier shared should be relevant.

@anatoli I figured I’d chime in. To recap, you’re running dockerized Grafana + databases on a Raspberry Pi and experiencing issues under high query load. I’m fairly certain that you’re simply overloading the system. The RPi is a constrained system meant for low-intensity tasks, it’s not a high-performance server. So it’s not surprising that you’re seeing this behavior; I don’t think Grafana is the culprit here. I’d suggest you switch to a server with more resources if you want to run bigger queries.