Redis Session doesn't work with Grafana + Redis over Swarm


Hi everyone,
I’m use Docker SWARM over Docker-CE v18.09.1, Grafana docker image v6.0.1 (0c44a04) with sqlite3 DB and Redis docker image v5.0.3.

When I’m deploying the stack (Grafana + Redis) all work fine without errors but Grafana close connection and sendme back to login page very often (1 o 2 times every hour). I think if I configure REDIS that’s going to solve my issue…

Well, I configure REDIS and GRAFANA to use it and when start it all together I can’t see any session stored in Redis. Redis is Up and ready and Grafana too, My Grafana log level is DEBUG.

Any suggest to solve this issue or increase the log level?

That’s my grafana.ini FULL FILE

provider = redis
provider_config = “addr=swarm01:6379,pool_size=100,prefix=grafana”
cookie_secure = true

login_cookie_name = grafana_session
login_maximum_inactive_lifetime_days = 7
login_maximum_lifetime_days = 30
token_rotation_interval_minutes = 1440

That’s my REDIS started logs:

[root@swarm03 ~]# docker logs 634a3b552108
1:C 14 Mar 2019 08:44:58.913 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 14 Mar 2019 08:44:58.913 # Redis version=5.0.3, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 14 Mar 2019 08:44:58.913 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
1:M 14 Mar 2019 08:44:58.915 * Running mode=standalone, port=6379.
1:M 14 Mar 2019 08:44:58.915 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
1:M 14 Mar 2019 08:44:58.915 # Server initialized
1:M 14 Mar 2019 08:44:58.915 * Ready to accept connections

That’s my GRAFANA started logs, FULL FILE

t=2019-03-14T08:46:01+0000 lvl=dbug msg=“Looking for App Dashboard Updates” logger=plugins,
t=2019-03-14T08:46:01+0000 lvl=dbug msg=“Found old rendered image to delete” logger=cleanup deleted=0 kept=0,
t=2019-03-14T08:46:01+0000 lvl=info msg=“Initializing Stream Manager”,
t=2019-03-14T08:46:01+0000 lvl=info msg=“HTTP Server Listen” logger=http.server address= protocol=http subUrl= socket=,
t=2019-03-14T08:46:01+0000 lvl=dbug msg=“Checking for updates” logger=plugins,
t=2019-03-14T08:46:02+0000 lvl=dbug msg=“Scheduling update” logger=alerting.scheduler ruleCount=3,
t=2019-03-14T08:46:12+0000 lvl=dbug msg=“Scheduling update” logger=alerting.scheduler ruleCount=3,

Thanks a lot,



Ok, my mistake … I had some badly configured alerts + SQLITE with this configuration Grafana it’s was hanging randomly.
I migrated to Postgres and removed bad alerts and all is working fine again.