Metabase getting routed to login page upon dashboard refreshes

Hello,

We have a dashboard in Metabase that we have set up for 1 minute refreshes. At times, we get kicked to the login page. However, we are still logged in, and upon going to the bookmarked dashboard link, the dashboard renders fine and refreshes fine. Logs do not show anything around it.

Version: v0.45.0
MB_SESSION_TIMEOUT is set to 21 days

Looking at cookies through developer setting, I see that the expiration are correct for metabase.TIMEOUT, metabase.SESSION, and metabase.DEVICE. Can also find the device and session information in the postgres backend database.

Any isights on what is going on? Or any other recommendations what we could look at?

Thanks,
Gunjan

Hi @gunjankaphle
You should be using a different environment variable:
https://www.metabase.com/docs/latest/configuring-metabase/environment-variables#max_session_age
You would have to look at the browser developer Network-tab when you get routed to login to understand what was received. It could be caused by a reverse-proxy returning an unexpected error code.

Thank you @flamber. I will enable the network trace and also set the env variables to debug more.

Gunjan

FWIW, this was an issue with Cloudflare timeouts on our end.
After increasing the timeout our dashboards have been running fine.

Thanks,
Gunjan