Grafana server error: failed to look up user based on cookie

Thanks for your reply.
Here is a brief summary of my application and my problem.

I’m running three docker containers on Raspberry Pi4. Web container(Django container), DB container and Grafana container. Grafana server version is 8.0.6.
Grafana works properly when the time range is set up to 3 days. However, it doesn’t work when the time range is set beyond.
For example, when the time range is set to 7days or 1 month, refreshing procedure is very slow and later I get the following error for some panels. After that, grafana is unresponsive and no longer working.


At the same time, it affects the other containers. The other containers are also very slow to respond. I checked grafana docker container logs.

After rebooting the Raspberry Pi and resetting the time range back to original (30 minutes, 1hour, 3hours, 1 day, 2 days) it works again.
I’m very struggling with this problem for a few days, but I haven’t found out why.
I attached docker-compose.yml file I used.


version: ‘3’

volumes:
maria_data: {}
grafana_data: {}

services:
db:
  image: jsurf/rpi-mariadb
volumes:
  - maria_data:/var/lib/mysql/data
  - ./mysql-dump:/docker-entrypoint-initdb.d
environment:
  - PUID=1000
  - PGID=1000
  - TZ=Etc/UTC
  - MYSQL_ROOT_PASSWORD=admin12345
  - MYSQL_DATABASE=dtects_db
  - MYSQL_USER=admin
  - MYSQL_PASSWORD=admin12345
ports:
  - 3306:3306
restart: unless-stopped

 django:
   build:
     context: .
     dockerfile: ./compose/django/Dockerfile-dev
   network_mode: “host”
   privileged: true
   volumes:
     - ./:/app/
     - ./mosquitto/default.conf:/etc/mosquitto/conf.d/default.conf
     - ./mosquitto/passwd:/etc/mosquitto/passwd
     - /run/dbus/system_bus_socket:/host/run/dbus/system_bus_socket
  depends_on:
    - db
  restart: always
  expose:
     -“1883”
  devices:
    - “/dev/ttyAMA0:/dev/ttyAMA0”
  cap_add:
    -NET_ADMIN
  environment:
    -DBUS_SYSTEM_BUS_ADDRESS=“unix:path=/host/run/dbus/system_bus_socket”

  grafana:
     image: grafana/grafana:latest
     volumes:
       - grafana_data:/var/lib/grafana:rw
       - ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
       - ./grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards
       - ./grafana/dashboards:/var/lib/grafana/dashboards
       - ./grafana/plugins:/var/lib/grafana/plugins
    ports:
       - “3000:3000”
    restart: unless-stopped
    depends_on:
       -db

I hope you can help me to solve this issue.
Thanks in advance.
Anatoli

Hi @mefraimsson
Did you check my post above?
I’m looking forward to your update for this problem. This is an issue I’m struggling with for a really long time in my application.
I hope you help me as soon as possible

Anatoli